.text:10009290 sub_10009290 proc near ; CODE XREF: sub_10009410+1A8p .text:10009290 ; sub_10009A20+Bp ... .text:10009290 .text:10009290 lpOutBuffer = dword ptr -434h .text:10009290 var_430 = dword ptr -430h .text:10009290 var_428 = dword ptr -428h .text:10009290 var_424 = byte ptr -424h .text:10009290 OutBuffer = byte ptr -420h .text:10009290 var_41F = byte ptr -41Fh .text:10009290 var_41E = word ptr -41Eh .text:10009290 var_41C = dword ptr -41Ch .text:10009290 var_418 = dword ptr -418h .text:10009290 var_414 = byte ptr -414h .text:10009290 var_410 = dword ptr -410h .text:10009290 Dst = byte ptr -408h .text:10009290 var_4 = dword ptr -4 .text:10009290 arg_0 = dword ptr 4 .text:10009290 .text:10009290 sub esp, 434h .text:10009296 mov eax, dword_100F9E6C .text:1000929B xor eax, esp .text:1000929D mov [esp+434h+var_4], eax .text:100092A4 mov eax, [esp+434h+arg_0] .text:100092AB push ebx .text:100092AC push ebp .text:100092AD push edi .text:100092AE push 8000100h .text:100092B3 push 400h .text:100092B8 lea ecx, [esp+448h+Dst] .text:100092BC push ecx .text:100092BD push eax .text:100092BE call sub_10089490 .text:100092C3 push offset Src ; "\n" .text:100092C8 lea edx, [esp+454h+Dst] .text:100092CC push 400h ; DstSize .text:100092D1 push edx ; Dst .text:100092D2 call _strcat_s .text:100092D7 lea eax, [esp+45Ch+Dst] .text:100092DB add esp, 1Ch .text:100092DE lea edx, [eax+1] .text:100092E1 .text:100092E1 loc_100092E1: ; CODE XREF: sub_10009290+58j .text:100092E1 mov cl, [eax] .text:100092E3 add eax, 1 .text:100092E6 test cl, cl .text:100092E8 jnz short loc_100092E1 .text:100092EA sub eax, edx .text:100092EC cmp eax, 400h .text:100092F1 jb short loc_10009310 .text:100092F3 mov eax, 1 .text:100092F8 pop edi .text:100092F9 pop ebp .text:100092FA pop ebx .text:100092FB mov ecx, [esp+434h+var_4] .text:10009302 xor ecx, esp .text:10009304 call sub_1008E34A .text:10009309 add esp, 434h .text:1000930F retn .text:10009310 ; --------------------------------------------------------------------------- .text:10009310 .text:10009310 loc_10009310: ; CODE XREF: sub_10009290+61j .text:10009310 lea ebp, [eax+0Fh] .text:10009313 and ebp, 0FFFFFFF0h .text:10009316 xor ebx, ebx .text:10009318 cmp ebp, eax .text:1000931A jbe short loc_1000932F .text:1000931C mov ecx, ebp .text:1000931E sub ecx, eax .text:10009320 push ecx ; Size .text:10009321 lea edx, [esp+eax+444h+Dst] .text:10009325 push ebx ; Val .text:10009326 push edx ; Dst .text:10009327 call _memset .text:1000932C add esp, 0Ch .text:1000932F .text:1000932F loc_1000932F: ; CODE XREF: sub_10009290+8Aj .text:1000932F cmp ebp, ebx .text:10009331 lea eax, [esp+440h+Dst] .text:10009335 mov [esp+440h+lpOutBuffer], eax .text:10009339 jbe loc_100093EE .text:1000933F mov word ptr [esp+440h+var_428], bx .text:10009344 mov byte ptr [esp+440h+var_428+2], bl .text:10009348 mov byte ptr [esp+440h+var_428+3], bl .text:1000934C lea esp, [esp+0] .text:10009350 .text:10009350 loc_10009350: ; CODE XREF: sub_10009290+158j .text:10009350 movzx edx, byte ptr [esi+21h] ; char .text:10009354 mov ecx, [esp+440h+var_428] .text:10009358 mov ebx, [esi+1Ch] .text:1000935B mov eax, 0Ch .text:10009360 mov [esp+440h+var_418], ecx .text:10009364 push edx .text:10009365 lea ecx, [esp+444h+OutBuffer] ; lpOutBuffer .text:10009369 mov [esp+444h+var_430], eax .text:1000936D mov [esp+444h+OutBuffer], 3 .text:10009372 mov [esp+444h+var_41E], 1234h .text:10009379 mov [esp+444h+var_41F], 8 .text:1000937E mov [esp+444h+var_41C], ebp .text:10009382 call sub_10005BC0 .text:10009387 add esp, 4 .text:1000938A test eax, eax .text:1000938C jnz short loc_100093EE .text:1000938E movzx eax, byte ptr [esi+20h] .text:10009392 mov edi, [esi+1Ch] .text:10009395 push eax .text:10009396 lea eax, [esp+444h+var_430] .text:1000939A lea ecx, [esp+444h+var_414] ; lpOutBuffer .text:1000939E call sub_10005CF0 .text:100093A3 add esp, 4 .text:100093A6 test eax, eax .text:100093A8 jnz short loc_100093EE .text:100093AA cmp [esp+440h+var_430], eax .text:100093AE jz short loc_100093EE .text:100093B0 cmp [esp+440h+var_414], 8 .text:100093B5 jnz short loc_100093EE .text:100093B7 mov eax, [esp+440h+var_410] .text:100093BB test eax, eax .text:100093BD mov edi, eax .text:100093BF jbe short loc_100093E6 .text:100093C1 mov cl, [esi+24h] .text:100093C4 mov ebx, [esi+1Ch] .text:100093C7 mov [esp+440h+var_424], cl .text:100093CB mov edx, dword ptr [esp+440h+var_424] ; char .text:100093CF mov ecx, [esp+440h+lpOutBuffer] ; lpOutBuffer .text:100093D3 push edx .text:100093D4 call sub_10005BC0 .text:100093D9 add esp, 4 .text:100093DC test eax, eax .text:100093DE jnz short loc_100093EE .text:100093E0 sub ebp, edi .text:100093E2 add [esp+440h+lpOutBuffer], edi .text:100093E6 .text:100093E6 loc_100093E6: ; CODE XREF: sub_10009290+12Fj .text:100093E6 test ebp, ebp .text:100093E8 ja loc_10009350 .text:100093EE .text:100093EE loc_100093EE: ; CODE XREF: sub_10009290+A9j .text:100093EE ; sub_10009290+FCj ... .text:100093EE mov ecx, [esp+440h+var_4] .text:100093F5 pop edi .text:100093F6 mov eax, ebp .text:100093F8 neg eax .text:100093FA pop ebp .text:100093FB sbb eax, eax .text:100093FD pop ebx .text:100093FE xor ecx, esp .text:10009400 and eax, 6 .text:10009403 call sub_1008E34A .text:10009408 add esp, 434h .text:1000940E retn .text:1000940E sub_10009290 endp