Function at 0x591a70
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, dword [edi + 0x44]
mov ecx, dword [edi + 0x30]
mov esi, dword [edi + 0xdc]
sub ebp, ecx
test esi, esi
je 0x59217f
mov eax, dword [edi + 0xe0]
test eax, eax
je 0x59217f
mov eax, dword [edi + 0xe4]
test eax, eax
je 0x59217f
mov eax, dword [edi + 0xe8]
test eax, eax
je 0x59217f
mov ebx, dword [edi + 0x40]
mov ecx, dword [edi + 0x24]
mov eax, ebp
sub eax, ebx
lea eax, [eax + ecx + 0x24]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi - 8], eax
mov eax, dword [edi + 0x28]
mov esi, dword [edi + 0xe0]
add eax, ebp
push eax
sub esi, 8
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x2c]
mov esi, dword [edi + 0xe4]
add eax, ebp
push eax
sub esi, 8
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x44]
mov esi, dword [edi + 0xe8]
push eax
sub esi, 8
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x8c]
test eax, eax
jne 0x591b60
mov eax, dword [edi + 0x14]
cmp eax, 0x40
je 0x591b60
cmp eax, 0x80
je 0x591b60
mov esi, dword [edi + 8]
cmp esi, 0x3e8
je 0x591be5
test esi, esi
je 0x591be5
mov edx, dword [edi + 0x7c]
push 0
push 0x3e8
push 0
push edx
call fcn.005e09d0
push 0
push esi
push edx
push eax
call fcn.005dffe0
inc eax
jmp 0x591be2
mov eax, dword [edi + 0x78]
test eax, eax
jne 0x591b70
mov eax, dword [edi + 0x80]
mov dword [edi + 0x78], eax
mov esi, dword [edi + 0xc]
cmp esi, 0x3e8
jne 0x591b82
mov eax, dword [edi + 0x78]
test eax, eax
jne 0x591ba9
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x591ba9
test esi, esi
je 0x591ba9
push 0
push 0x3e8
push 0
push eax
call fcn.005e09d0
push 0
push esi
push edx
push eax
call fcn.005dffe0
mov dword [edi + 0x78], eax
mov eax, dword [edi + 0x14]
cmp eax, 0x40
je 0x591bb8
cmp eax, 0x80
jne 0x591be5
mov esi, dword [edi + 0x10]
test esi, esi
je 0x591be5
mov eax, dword [edi + 0x84]
test eax, eax
je 0x591be5
push 0
push 0x3e8
push 0
push eax
call fcn.005e09d0
push 0
push esi
push edx
push eax
call fcn.005dffe0
mov dword [edi + 0x78], eax
mov esi, dword [edi + 0xf4]
test esi, esi
je 0x591c14
mov eax, dword [edi + 0x78]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi + 0x14], eax
mov eax, dword [edi + 0x64]
test eax, eax
jne 0x591c14
mov esi, dword [edi + 0xf4]
push 1
add esi, 0x20
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [edi + 0xf8]
test ebx, ebx
je 0x591c4e
cmp byte [ebx], 0
mov eax, dword [edi + 0x7c]
push eax
jne 0x591c31
call sub.WS2_32.dll_htonl
mov dword [ebx + 0x10], eax
jmp 0x591c4e
call sub.WS2_32.dll_htonl
mov ebp, eax
xor eax, eax
push eax
xor esi, esi
call sub.WS2_32.dll_htonl
xor ecx, ecx
or esi, eax
or ebp, ecx
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], ebp
mov esi, dword [edi + 0xf4]
test esi, esi
je 0x591c76
push 0xf
call sub.WS2_32.dll_htonl
mov edx, dword [esp + 0x1c]
mov dword [esi], eax
mov esi, dword [edi + 0xf4]
push edx
add esi, 0xc
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xfc]
test eax, eax
je 0x591d3d
mov ecx, dword [edi + 0xdc]
mov ebx, dword [esp + 0x18]
sub eax, ecx
push 0
add eax, 8
add ecx, 0xfffffff8
mov esi, eax
lea eax, [esp + 0x14]
push eax
push esi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59217f
mov ebp, dword [esp + 0x20]
mov esi, 0
push ebx
mov ecx, dword [ebp]
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, esi
mov ecx, edi
mov dword [ebp + 4], eax
call fcn.00592470
mov ecx, dword [ebp]
lea edx, [esp + 0x10]
add ecx, 0x24
push 0
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, esi
push edx
mov dword [ebp + 4], eax
mov ecx, dword [edi + 0x40]
mov esi, dword [edi + 0xe8]
mov eax, dword [edi + 0xfc]
sub esi, ecx
add ecx, eax
sub esi, eax
push esi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59217f
mov ecx, dword [ebp]
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, 0
mov dword [ebp + 4], eax
jmp 0x591df1
mov eax, dword [edi + 0xdc]
mov esi, dword [edi + 0xe0]
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
sub esi, eax
push 0
push ecx
add eax, 0xfffffff8
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59217f
mov ebp, dword [esp + 0x20]
mov esi, 0
push ebx
mov ecx, dword [ebp]
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, esi
mov ecx, edi
mov dword [ebp + 4], eax
call fcn.00592470
mov ecx, dword [ebp]
lea edx, [esp + 0x10]
add ecx, 0x24
push 0
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, esi
push edx
mov dword [ebp + 4], eax
mov eax, dword [edi + 0xe0]
mov esi, dword [edi + 0xe8]
sub esi, eax
add eax, 0xfffffff8
add esi, 8
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59217f
mov ecx, dword [ebp]
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, 0
mov dword [ebp + 4], eax
mov esi, dword [edi + 0x34]
mov ecx, dword [edi + 0xec]
lea eax, [esp + 0x10]
push 0
push eax
push esi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59217f
mov ecx, dword [ebp]
add ecx, eax
mov dword [ebp], ecx
mov ebx, dword [ebp + 4]
adc ebx, 0
mov dword [ebp + 4], ebx
mov eax, dword [edi + 0x54]
mov esi, dword [edi + 0x50]
mov edx, dword [edi + 0x4c]
mov ecx, dword [edi + 0x48]
mov ebx, dword [edi + 0x58]
add eax, esi
mov esi, dword [edi + 0x88]
add eax, edx
add eax, ecx
add eax, ebx
add eax, esi
push eax
mov dword [esp + 0x24], eax
call fcn.005f6c5c
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x1c], esi
je 0x59217f
mov eax, dword [edi + 0x4c]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov edx, dword [0x6de320]
add esi, 4
push 0
mov dword [esi], edx
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xbc]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [edi + 0xa4]
add esi, 4
test ebx, ebx
je 0x591ecb
mov eax, dword [ebx]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebx + 4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [ebx + 8]
add esi, 4
test ebx, ebx
jne 0x591ea9
mov eax, dword [edi + 0x64]
test eax, eax
je 0x591f26
mov eax, dword [edi + 0x48]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [0x6de318]
add esi, 4
push 0
mov dword [esi], eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xc4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [edi + 0xb4]
add esi, 4
test ebx, ebx
je 0x591f26
mov eax, dword [ebx + 8]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [ebx + 0xc]
add esi, 4
test ebx, ebx
jne 0x591f11
mov eax, dword [edi + 0x88]
test eax, eax
je 0x591f8f
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ecx, dword [0x6de310]
add esi, 4
push 0
mov dword [esi], ecx
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xa0]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [edi + 0x98]
add esi, 4
test ebx, ebx
je 0x591f8f
mov eax, dword [ebx]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebx + 4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [ebx + 8]
add esi, 4
test ebx, ebx
jne 0x591f6d
mov eax, dword [edi + 0x50]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov edx, dword [0x6de308]
add esi, 4
push 0
mov dword [esi], edx
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xc0]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [edi + 0xac]
add esi, 4
test ebx, ebx
je 0x591fff
mov eax, dword [ebx]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebx + 4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebx + 8]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [ebx + 0xc]
add esi, 4
test ebx, ebx
jne 0x591fcf
mov eax, dword [edi + 0x54]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [0x6de300]
add esi, 4
push 0
mov dword [esi], eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
push 0
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x5c]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x5c]
add esi, 4
xor ebx, ebx
test eax, eax
jbe 0x59205f
mov ecx, dword [edi + 0x60]
mov eax, dword [ecx + ebx*4]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x5c]
add esi, 4
inc ebx
cmp ebx, eax
jb 0x592046
mov eax, dword [edi + 0x58]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xc8]
add esi, 4
test eax, eax
mov eax, 0x6de2f8
jne 0x592081
mov eax, 0x6de2f0
mov edx, dword [eax]
push 0
mov dword [esi], edx
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xc4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [edi + 0xb4]
add esi, 4
test ebx, ebx
je 0x5920e7
mov eax, dword [edi + 0xc8]
test eax, eax
je 0x5920d3
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ecx, 0x20
call fcn.005e21e0
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
add esi, 4
mov eax, dword [ebx]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebx, dword [ebx + 0xc]
add esi, 4
test ebx, ebx
jne 0x5920af
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
push ebx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x59217f
mov ebx, dword [ebp]
push esi
add ebx, eax
mov dword [ebp], ebx
mov edx, dword [ebp + 4]
adc edx, 0
mov dword [ebp + 4], edx
call fcn.005f6c85
mov eax, dword [edi + 0xe8]
mov ecx, dword [edi + 0x30]
mov esi, dword [edi + 0xdc]
mov edi, dword [edi + 0x24]
lea edx, [eax + ecx]
add esp, 4
lea ebx, [edi + esi]
cmp ebx, edx
jbe 0x59217f
sub edi, eax
lea eax, [esp + 0x10]
sub edi, ecx
mov ecx, dword [esp + 0x18]
add edi, esi
push 0
push eax
add edx, 0xfffffff8
push edi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59217f
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x59217f
mov ecx, dword [ebp]
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [ebp + 4]
adc eax, 0
mov dword [ebp + 4], eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc