Function at 0x598230
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 0x59893f
mov eax, dword [edi + 0xe0]
test eax, eax
je 0x59893f
mov eax, dword [edi + 0xe4]
test eax, eax
je 0x59893f
mov eax, dword [edi + 0xe8]
test eax, eax
je 0x59893f
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 0x598320
mov eax, dword [edi + 0x14]
cmp eax, 0x40
je 0x598320
cmp eax, 0x80
je 0x598320
mov esi, dword [edi + 8]
cmp esi, 0x3e8
je 0x5983a5
test esi, esi
je 0x5983a5
mov edx, dword [edi + 0x7c]
push 0
push 0x3e8
push 0
push edx
call fcn.005e7a50
push 0
push esi
push edx
push eax
call fcn.005e7060
inc eax
jmp 0x5983a2
mov eax, dword [edi + 0x78]
test eax, eax
jne 0x598330
mov eax, dword [edi + 0x80]
mov dword [edi + 0x78], eax
mov esi, dword [edi + 0xc]
cmp esi, 0x3e8
jne 0x598342
mov eax, dword [edi + 0x78]
test eax, eax
jne 0x598369
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x598369
test esi, esi
je 0x598369
push 0
push 0x3e8
push 0
push eax
call fcn.005e7a50
push 0
push esi
push edx
push eax
call fcn.005e7060
mov dword [edi + 0x78], eax
mov eax, dword [edi + 0x14]
cmp eax, 0x40
je 0x598378
cmp eax, 0x80
jne 0x5983a5
mov esi, dword [edi + 0x10]
test esi, esi
je 0x5983a5
mov eax, dword [edi + 0x84]
test eax, eax
je 0x5983a5
push 0
push 0x3e8
push 0
push eax
call fcn.005e7a50
push 0
push esi
push edx
push eax
call fcn.005e7060
mov dword [edi + 0x78], eax
mov esi, dword [edi + 0xf4]
test esi, esi
je 0x5983d4
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 0x5983d4
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 0x59840e
cmp byte [ebx], 0
mov eax, dword [edi + 0x7c]
push eax
jne 0x5983f1
call sub.WS2_32.dll_htonl
mov dword [ebx + 0x10], eax
jmp 0x59840e
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 0x598436
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 0x5984fd
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 0x59893f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59893f
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.00598c30
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 0x59893f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59893f
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 0x5985b1
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 0x59893f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59893f
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.00598c30
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 0x59893f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59893f
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 0x59893f
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x59893f
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.005fdccd
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x1c], esi
je 0x59893f
mov eax, dword [edi + 0x4c]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov edx, dword [str.stts]
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 0x59868b
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 0x598669
mov eax, dword [edi + 0x64]
test eax, eax
je 0x5986e6
mov eax, dword [edi + 0x48]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [str.stss]
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 0x5986e6
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 0x5986d1
mov eax, dword [edi + 0x88]
test eax, eax
je 0x59874f
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ecx, dword [str.ctts]
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 0x59874f
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 0x59872d
mov eax, dword [edi + 0x50]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov edx, dword [str.stsc]
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 0x5987bf
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 0x59878f
mov eax, dword [edi + 0x54]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [str.stsz]
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 0x59881f
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 0x598806
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, str.co64
jne 0x598841
mov eax, str.stco
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 0x5988a7
mov eax, dword [edi + 0xc8]
test eax, eax
je 0x598893
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ecx, 0x20
call fcn.005e9260
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 0x59886f
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 0x59893f
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x59893f
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.005fdcf6
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 0x59893f
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 0x59893f
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x59893f
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