Function at 0x450070
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
mov byte [esp + 0xf], 1
cmp eax, 0x274a
je 0x4500b2
test eax, eax
je 0x4500a6
mov eax, dword [esi + 0x9c]
cmp eax, 0xffffffff
je 0x450416
push eax
jmp 0x450406
mov eax, esi
call fcn.0040a930
cmp eax, 5
jne 0x4500b7
mov byte [esp + 0xf], 0
cmp dword [esi + 0x84], 2
jne 0x45041f
cmp dword [esi + 0x80], 0
jne 0x4500da
call fcn.00450470
test eax, eax
je 0x45041f
mov ebx, dword [esi + 0xd0]
or edi, 0xffffffff
cmp byte [esp + 0xf], 0
mov byte [esi + 0xc0], 1
mov dword [esp + 0x14], edi
je 0x45012d
mov ecx, dword [esi + 0x8c]
lea edx, [edi + 2]
call fcn.0041af20
mov edi, eax
and eax, edx
mov dword [esp + 0x14], edx
cmp eax, 0xffffffff
je 0x45012d
mov eax, esi
call fcn.0040a930
cmp eax, 6
je 0x45012d
mov eax, ebx
cdq
cmp edx, dword [esp + 0x14]
jl 0x45012d
jg 0x45012b
cmp eax, edi
jbe 0x45012d
mov ebx, edi
test ebx, ebx
je 0x45041f
mov edx, dword [esi]
mov eax, dword [esi + 0xa0]
mov edx, dword [edx + 0x14]
push 0
push ebx
push eax
mov ecx, esi
call edx
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4501a1
call sub.WS2_32.dll_WSAGetLastError
cmp dword [esi + 0xc8], 0
je 0x450168
cmp eax, 0x274a
je 0x45041f
cmp eax, 0x2733
je 0x45041f
mov eax, dword [esi + 0x9c]
cmp eax, 0xffffffff
je 0x45018f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x9c], 0xffffffff
push 1
mov eax, esi
call fcn.00451020
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test ebx, ebx
jne 0x4501d3
mov eax, dword [esi + 0x9c]
cmp eax, 0xffffffff
je 0x4501c1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x9c], 0xffffffff
push 0
mov eax, esi
call fcn.00451020
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x8c]
mov eax, dword [eax + 0x54]
mov ecx, ebx
call fcn.00446f40
and edi, dword [esp + 0x14]
cmp edi, 0xffffffff
je 0x45020d
mov eax, esi
call fcn.0040a930
cmp eax, 6
je 0x45020d
mov ecx, dword [esi + 0x8c]
mov eax, ebx
cdq
add dword [ecx + 0x9e0], eax
adc dword [ecx + 0x9e4], edx
cmp byte [esi + 0xd4], 0
je 0x4503c1
cmp dword [esi + 0xa4], 0
jne 0x450238
mov ecx, dword [esi + 0xd0]
push ecx
call fcn.004576a9
add esp, 4
mov dword [esi + 0xa4], eax
mov eax, dword [esi + 0xa4]
mov edx, dword [esi + 0xa0]
mov ecx, dword [esi + 0xd0]
mov dword [esi + 0xe4], eax
xor eax, eax
lea edi, [esi + 0xd8]
push eax
push edi
mov dword [edi], edx
mov dword [esi + 0xdc], ebx
mov dword [esi + 0xe8], ecx
mov dword [esi + 0xe0], eax
mov dword [esi + 0xec], eax
call fcn.004518d0
mov edx, dword [esi + 0xe0]
mov ecx, dword [esi + 0xec]
add esp, 8
add dword [esi + 0x110], edx
mov ebx, 0
adc dword [esi + 0x114], ebx
add dword [esi + 0x118], ecx
adc dword [esi + 0x11c], ebx
cmp eax, ebx
jne 0x450325
lea esp, [esp]
mov eax, dword [esi + 0xd0]
sub eax, dword [esi + 0xe8]
mov ecx, dword [esi + 0xa4]
push ebx
lea edx, [esp + 0x14]
push edx
mov edx, dword [esi + 0x9c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45037e
mov eax, dword [esi + 0xd0]
mov ecx, dword [esp + 0x10]
mov edx, eax
sub edx, dword [esi + 0xe8]
cmp ecx, edx
jne 0x45037e
add dword [esi + 0x120], ecx
mov ecx, dword [esi + 0xa4]
push ebx
adc dword [esi + 0x124], ebx
push edi
mov dword [esi + 0xe4], ecx
mov dword [esi + 0xe8], eax
call fcn.004518d0
add esp, 8
cmp eax, ebx
je 0x4502b0
cmp eax, 1
jne 0x450387
mov ecx, dword [esi + 0xd0]
sub ecx, dword [esi + 0xe8]
mov edx, dword [esi + 0xa4]
push ebx
lea eax, [esp + 0x14]
push eax
mov eax, dword [esi + 0x9c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45037e
mov ecx, dword [esi + 0xd0]
sub ecx, dword [esi + 0xe8]
mov eax, dword [esp + 0x10]
cmp eax, ecx
jne 0x45037e
add dword [esi + 0x120], eax
adc dword [esi + 0x124], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi + 0x9c]
push edx
jmp 0x450406
cmp eax, ebx
je 0x45041f
cmp eax, 0xfffffffb
je 0x45041f
mov eax, dword [esi + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 6
mov eax, esi
mov dword [esi + 0x9c], 0xffffffff
call fcn.00451020
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi + 0xa0]
mov eax, dword [esi + 0x9c]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4503ff
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x4503ff
add dword [esi + 0x120], eax
adc dword [esi + 0x124], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 0x9c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x9c], 0xffffffff
push 3
mov eax, esi
call fcn.00451020
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4