Function at 0x10089e8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0xb4
mov eax, dword [reloc.msvcrt.dll___p__commode]
xor eax, dword [ebp + 0x74]
push ebx
push esi
mov esi, dword [ebp + 0x78]
mov ebx, dword [esi + 0x34]
mov dword [ebp + 0x6c], eax
xor eax, eax
push edi
xor edi, edi
mov dword [ebp + 0x68], eax
mov ecx, dword [ebx]
cmp ecx, edi
mov dword [ebp + 0x5c], edi
mov dword [ebp + 0x64], ecx
je 0x10087ad
cmp ecx, 0x78
jb 0x10087a3
cmp byte [ebx + 8], 0x50
je 0x10087ad
mov eax, 0x271e
jmp 0x1008f98
mov ecx, dword [ebx + 0x18]
or ecx, dword [ebx + 0x1c]
je 0x1008809
lea eax, [ebp + 0x68]
push eax
push dword [ebx + 0x18]
push dword [0x1024f90]
call fcn.0100450c
test al, al
je 0x100898d
mov eax, dword [ebp + 0x68]
mov ecx, dword [eax + 0x8c]
cmp ecx, dword [ebx + 0xc]
jne 0x100898d
mov ecx, dword [eax + 0x98]
cmp ecx, dword [ebx + 0x10]
jne 0x100898d
mov ecx, dword [eax + 0x9c]
cmp ecx, dword [ebx + 0x14]
jne 0x100898d
mov ecx, dword [ebp + 0x7c]
mov dword [ecx], eax
jmp 0x1008964
mov cl, byte [ebx + 9]
cmp cl, 1
je 0x1008824
cmp cl, 2
je 0x1008824
cmp cl, 4
je 0x1008964
jmp 0x100898d
lea eax, [ebp + 0x68]
push eax
call fcn.0100bcb3
test eax, eax
jne 0x1008be6
mov eax, dword [ebp + 0x68]
mov dword [eax + 8], esi
add dword [esi + 0x54], 3
mov eax, dword [ebp + 0x68]
mov word [eax + 0xd8], di
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0x8c], eax
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0x98], eax
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0x9c], eax
mov eax, dword [ebp + 0x68]
add eax, 0xb4
mov dword [eax + 4], eax
mov dword [eax], eax
mov eax, dword [ebp + 0x68]
mov dword [eax + 0xbc], edi
mov ecx, dword [ebp + 0x68]
lea eax, [esi + 8]
mov edx, dword [eax + 4]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [edx], ecx
mov dword [eax + 4], ecx
cmp dword [reloc.msvcrt.dll___p__commode], edi
jne 0x10088a4
mov dword [reloc.msvcrt.dll___p__commode], edi
inc dword [reloc.msvcrt.dll___p__commode]
push 4
call fcn.01005916
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x7c]
mov dword [ecx], eax
and dword [eax + 0xc4], 0
mov edi, dword [ebp + 0x68]
add edi, 0xa4
lea esi, [ebx + 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov al, byte [ebx + 0xa]
test al, al
je 0x10088dc
movzx eax, al
jmp 0x10088df
push WSAWaitForMultipleEvents
pop eax
mov ecx, dword [ebp + 0x68]
mov byte [ecx + 0x94], al
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebp + 0x68]
and eax, 0x2c0
mov dword [ecx + 0x90], eax
mov eax, dword [ebp + 0x78]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x1008961
cmp dword [eax + 4], 1
jne 0x1008961
push dword [eax]
push 0
push dword [0x1024f78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0xc4], eax
mov eax, dword [ebp + 0x68]
mov edi, dword [eax + 0xc4]
test edi, edi
je 0x1008be6
mov eax, dword [ebp + 0x78]
mov esi, dword [eax + 0x38]
mov ecx, dword [esi]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp + 0x68]
mov dword [edx + 0xc8], ecx
mov eax, dword [eax + 0x44]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0xcc], eax
mov eax, dword [ebp + 0x68]
movzx ecx, byte [ebx + 9]
dec ecx
je 0x1008e32
dec ecx
je 0x1008b3a
dec ecx
dec ecx
je 0x1008a67
dec ecx
je 0x10089a8
sub ecx, 0xf7
je 0x1008997
dec ecx
dec ecx
je 0x1008997
mov eax, 0x2726
jmp 0x1008f98
push eax
call fcn.010072b9
mov eax, dword [ebp + 0x7c]
and dword [eax], 0
jmp 0x1008b33
mov esi, dword [ebp + 0x78]
mov ecx, dword [esi + 0x38]
xor ebx, ebx
cmp ecx, ebx
jne 0x10089e6
mov ecx, dword [eax + 0xc4]
cmp ecx, ebx
je 0x10089cf
push ecx
push ebx
push dword [0x1024f78]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp + 0x68]
mov dword [eax + 0xc4], ebx
mov eax, dword [esi + 0x40]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0xc8], eax
mov eax, dword [esi + 0x44]
jmp 0x1008a59
cmp dword [ecx + 4], 1
jne 0x1008b33
push dword [ecx]
push ebx
push dword [0x1024f78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
mov dword [ebp + 0x7c], edi
je 0x1008be6
mov ebx, dword [ebp + 0x78]
mov esi, dword [ebx + 0x38]
mov ecx, dword [esi]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x68]
mov eax, dword [eax + 0xc4]
test eax, eax
je 0x1008a3e
push eax
push 0
push dword [0x1024f78]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp + 0x68]
mov eax, dword [ebp + 0x7c]
mov dword [ecx + 0xc4], eax
mov eax, dword [ebx + 0x40]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0xc8], eax
mov eax, dword [ebx + 0x44]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0xcc], eax
jmp 0x1008b33
test eax, eax
jne 0x1008aa4
mov edi, 0x1021f50
mov dword [ebp + 0x68], edi
push 0x48
pop ecx
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0x8c], eax
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0x98], eax
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0x9c], eax
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x7c]
mov dword [ecx], eax
lea eax, [ebx + 0x38]
push eax
call fcn.0100be99
mov esi, eax
or eax, reloc.msvcrt.dll___p__commode
cmp esi, eax
je 0x1008f98
mov ebx, dword [ebx + 0x20]
sub ebx, 0xc351
je 0x1008b02
dec ebx
dec ebx
je 0x1008aec
dec ebx
je 0x1008ae4
dec ebx
je 0x1008adc
dec ebx
jne 0x1008b33
push dword [ebp + 0x68]
call fcn.010068b9
jmp 0x1008af7
push esi
call fcn.01006890
jmp 0x1008af7
push esi
call fcn.0101d98a
jmp 0x1008af7
push 0xc353
push esi
call fcn.0101d93c
mov ecx, dword [ebp + 0x68]
mov dword [ecx + 0xd0], eax
jmp 0x1008b33
mov ecx, dword [ebp + 0x68]
xor eax, eax
inc eax
mov dword [ecx + 0xd0], eax
mov ecx, dword [ebp + 0x68]
test byte [ecx + 0x91], 2
jne 0x1008afa
mov edx, dword [ecx + 0x14]
test edx, edx
je 0x1008b2c
push dword [edx + 0x64]
push esi
call fcn.010173c5
jmp 0x1008af7
and dword [ecx + 0xd0], 0
xor eax, eax
jmp 0x1008f98
mov ecx, dword [ebx + 0x20]
and ecx, 0x200
or ecx, 0x40
or dword [eax + 0x90], ecx
mov edx, dword [ebp + 0x68]
lea eax, [edx + 0x4c]
push 0x10
mov esi, eax
pop ecx
lea edi, [ebp + 0x1c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
cmp word [ebx + 0x46], cx
mov dword [ebp + 0x64], eax
mov eax, dword [eax]
jne 0x1008b84
cmp eax, ecx
je 0x1008b33
cmp byte [eax + 1], 2
jne 0x1008b33
lea eax, [ebp + 0x60]
push eax
push 2
push edx
call fcn.01006a99
jmp 0x1008f98
cmp dword [ebx + 0x38], ecx
jne 0x1008b93
or byte [edx + 0x95], 0x20
mov edx, dword [ebp + 0x68]
cmp eax, ecx
je 0x1008bce
cmp dword [ebx + 0x38], ecx
jne 0x1008ba8
mov eax, dword [edx + 0xa8]
mov dword [ebx + 0x38], eax
mov edx, dword [ebp + 0x68]
cmp dword [ebx + 0x28], ecx
jne 0x1008bb6
mov eax, dword [ebx + 0x38]
mov dword [ebx + 0x28], eax
mov edx, dword [ebp + 0x68]
lea eax, [edx + 0xa8]
cmp dword [eax], ecx
jne 0x1008bc8
mov ecx, dword [ebx + 0x28]
mov dword [eax], ecx
mov edx, dword [ebp + 0x68]
add edx, 0x4c
mov dword [ebp + 0x5c], edx
movzx eax, word [ebx + 0x46]
push dword [0x1025038]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.01005e55
test eax, eax
jge 0x1008bf0
mov eax, 0x2747
jmp 0x1008f98
lea eax, [ebp - 0x24]
push eax
push ebx
push dword [ebp + 0x68]
call fcn.010084cb
test eax, eax
je 0x1008c0f
lea eax, [ebp - 0x24]
push eax
call fcn.01006023
jmp 0x100898d
cmp dword [ebp + 0x5c], 0
je 0x1008cb5
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax + 4]
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax + 8]
mov esi, dword [eax + 4]
push 2
add edi, 4
add esi, 4
xor eax, eax
mov eax, dword [ebp + 0x68]
pop ecx
repe cmpsd dword [esi], dword es:[edi]
je 0x1008c7a
cmp dword [eax + 0xbc], 0
je 0x1008c6c
add eax, 0xb4
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x68]
add eax, 0xb4
mov dword [eax + 4], eax
mov dword [eax], eax
mov eax, dword [ebp + 0x68]
and dword [eax + 0xbc], 0
mov eax, dword [ebp + 0x68]
lea ecx, [ebp + 0x60]
push ecx
push 2
push eax
call fcn.01006a99
jmp 0x1008cb5
cmp dword [eax + 0xbc], 0
je 0x1008ca9
add eax, 0xb4
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x68]
add eax, 0xb4
mov dword [eax + 4], eax
mov dword [eax], eax
mov eax, dword [ebp + 0x68]
and dword [eax + 0xbc], 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x64]
call fcn.01005f17
mov esi, dword [ebp + 0x64]
mov eax, dword [ebp - 0x24]
and byte [esi + 0x26], 0
mov dword [esi], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x2c], 1
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x68]
and byte [eax + 0x95], 0
push ebx
push dword [ebp + 0x68]
call fcn.01005e00
mov eax, dword [ebp + 0x68]
mov eax, dword [eax + 0xa0]
mov dword [esi + 0x14], eax
xor edi, edi
cmp dword [reloc.msvcrt.dll___p__commode], 7
jl 0x1008d1d
cmp dword [reloc.msvcrt.dll___p__commode], edi
je 0x1008d1d
lea eax, [ebp - 0x44]
push 0x1001b64
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
pop ecx
pop ecx
push edi
push dword [esi + 8]
push edi
push edi
push 7
call fcn.0101a10a
mov ecx, dword [esi + 8]
cmp dword [ecx + 0x5c], edi
mov eax, dword [ebx + 0x64]
lea eax, [eax + ebx + 0x64]
mov dword [ebp + 0x7c], edi
jle 0x1008d78
mov dword [ebp + 0x78], 0x60
mov edi, dword [eax]
add edi, eax
mov eax, dword [edi + 4]
dec eax
jne 0x1008d62
movzx eax, byte [ebx + 0xa]
mov ecx, dword [ebp + 0x78]
push 0
push eax
mov eax, dword [esi + 8]
push dword [eax + ecx]
call fcn.0101847b
mov eax, dword [edi]
mov ecx, dword [esi + 8]
add dword [ebp + 0x78], 0xc
add eax, edi
inc dword [ebp + 0x7c]
mov edx, dword [ebp + 0x7c]
cmp edx, dword [ecx + 0x5c]
jl 0x1008d43
cmp dword [ebp + 0x5c], 0
mov eax, dword [ebp + 0x68]
mov dword [esi + 0x20], eax
jne 0x1008d8d
mov dword [esi + 0x38], 1
jmp 0x1008d91
and dword [esi + 0x38], 0
lea eax, [ebp + 0x60]
push eax
push 0
push dword [ebp + 0x68]
call fcn.0100b3ba
mov ebx, eax
test ebx, ebx
je 0x1008e1c
lea eax, [ebp - 0x24]
push eax
call fcn.01006023
mov eax, dword [ebp + 0x64]
xor edx, edx
mov dword [eax], edx
mov dword [eax + 8], edx
mov dword [eax + 0x10], edx
mov edi, dword [ebp + 0x68]
push 0x10
add edi, 0x4c
cmp dword [ebp + 0x1c], edx
pop ecx
lea esi, [ebp + 0x1c]
rep movsd dword es:[edi], dword [esi]
je 0x1008dd8
lea eax, [ebp + 0x60]
push eax
push edx
jmp 0x1008f5d
mov eax, dword [ebp + 0x68]
and dword [eax + 0x90], 0xffffffbf
mov eax, dword [ebp + 0x68]
cmp dword [eax + 0xbc], edx
je 0x1008f8f
add eax, 0xb4
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x68]
add eax, 0xb4
mov dword [eax + 4], eax
mov dword [eax], eax
mov eax, dword [ebp + 0x68]
and dword [eax + 0xbc], 0
jmp 0x1008f8f
push esi
mov dword [esi + 0x38], 1
call fcn.010086e8
cmp dword [ebp + 0x1c], 0
jmp 0x1008f84
lea edi, [eax + 0xa4]
lea esi, [ebx + 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov al, byte [ebx + 0xa]
test al, al
je 0x1008e4b
movzx eax, al
jmp 0x1008e4e
push WSAWaitForMultipleEvents
pop eax
mov ecx, dword [ebp + 0x68]
mov byte [ecx + 0x94], al
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebp + 0x68]
and eax, 0x2c0
mov dword [ecx + 0x90], eax
mov eax, dword [ebp + 0x68]
push 0x10
pop ecx
push dword [0x1025038]
add eax, 0xc
push 1
mov esi, eax
lea edi, [ebp + 0x1c]
push eax
mov dword [ebp + 0x78], eax
rep movsd dword es:[edi], dword [esi]
call fcn.01005e55
test eax, eax
jl 0x1008be6
mov esi, dword [ebp + 0x78]
push esi
push dword [ebp + 0x64]
push ebx
push dword [ebp + 0x68]
call fcn.010072e9
test eax, eax
je 0x1008ebe
push esi
call fcn.01006023
mov edi, dword [ebp + 0x68]
push 0x10
add edi, 0xc
pop ecx
lea esi, [ebp + 0x1c]
rep movsd dword es:[edi], dword [esi]
jmp 0x100898d
mov eax, dword [esi]
mov al, byte [eax + 4]
mov byte [esi + 0x26], al
mov eax, dword [ebp + 0x68]
mov eax, dword [eax + 0xa0]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x68]
mov dword [esi + 0x20], eax
xor edi, edi
cmp dword [reloc.msvcrt.dll___p__commode], 7
jl 0x1008efc
cmp dword [reloc.msvcrt.dll___p__commode], edi
je 0x1008efc
lea eax, [ebp - 0x44]
push 0x1001b4c
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
pop ecx
pop ecx
push edi
push dword [esi + 8]
push edi
push edi
push 7
call fcn.0101a10a
mov esi, dword [esi + 8]
mov eax, dword [esi + 4]
movzx eax, byte [eax + 8]
push eax
movzx eax, byte [ebx + 0xa]
push eax
push dword [esi + 0x64]
call fcn.01018348
push 6
call fcn.01005916
lea eax, [ebp + 0x60]
push eax
push edi
push dword [ebp + 0x68]
call fcn.0100b3ba
mov ebx, eax
cmp ebx, edi
je 0x1008f81
push dword [ebp + 0x78]
call fcn.01006023
mov edi, dword [ebp + 0x68]
push 0x10
add edi, 0xc
pop ecx
lea esi, [ebp + 0x1c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
cmp dword [ebp + 0x1c], ecx
je 0x1008f69
lea eax, [ebp + 0x60]
push eax
push ecx
push dword [ebp + 0x68]
call fcn.0100b3ba
mov ebx, eax
jmp 0x1008f8f
mov eax, dword [ebp + 0x68]
and byte [eax + 0x90], 0x7f
mov eax, dword [ebp + 0x68]
cmp dword [eax + 0xbc], ecx
jmp 0x1008deb
cmp dword [ebp + 0x1c], edi
je 0x1008f8f
lea eax, [ebp + 0x1c]
push eax
call fcn.01006023
push 0
call fcn.01009918
mov eax, ebx
mov ecx, dword [ebp + 0x6c]
xor ecx, dword [ebp + 0x74]
pop edi
pop esi
pop ebx
call fcn.0101ed84
add ebp, 0x70
leave
ret 8