Function at 0x578be0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x3c]
mov edx, dword [edi + 0x28]
mov ecx, dword [edi + 0x38]
sub esi, edx
mov ebx, dword [edi + 0xb0]
mov eax, esi
sub eax, ecx
mov ecx, dword [edi + 0x1c]
sub ebx, 8
lea eax, [eax + ecx + 0x24]
push eax
call sub.WS2_32.dll_htonl
mov dword [ebx], eax
mov eax, dword [edi + 0x20]
mov ebx, dword [edi + 0xb4]
add eax, esi
push eax
sub ebx, 8
call sub.WS2_32.dll_htonl
mov dword [ebx], eax
mov eax, dword [edi + 0x24]
add eax, esi
mov esi, dword [edi + 0xb8]
push eax
sub esi, 8
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x3c]
mov esi, dword [edi + 0xbc]
push eax
sub esi, 8
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov esi, dword [edi + 8]
cmp esi, 0x3e8
je 0x578c79
mov edx, dword [edi + 0x70]
push 0
push 0x3e8
push 0
push edx
call fcn.005c5530
push 0
push esi
push edx
push eax
call fcn.005c4b60
inc eax
mov dword [edi + 0xc], eax
mov esi, dword [edi + 0xc8]
test esi, esi
je 0x578ca8
mov eax, dword [edi + 0xc]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi + 0x14], eax
mov eax, dword [edi + 0x5c]
test eax, eax
jne 0x578ca8
mov esi, dword [edi + 0xc8]
push 1
add esi, 0x20
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x578cbe
mov eax, dword [edi + 0x70]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi + 0x10], eax
mov esi, dword [edi + 0xc8]
test esi, esi
je 0x578ce6
push 0xf
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [esp + 0x1c]
mov esi, dword [edi + 0xc8]
push eax
add esi, 0xc
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xd0]
test eax, eax
je 0x578da7
mov ecx, dword [edi + 0xb0]
mov ebp, dword [esp + 0x18]
sub eax, ecx
lea edx, [esp + 0x10]
add eax, 8
push 0
mov esi, eax
push edx
add ecx, 0xfffffff8
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x5791db
mov ebx, dword [esp + 0x20]
mov esi, 0
push ebp
mov ecx, dword [ebx]
add ecx, eax
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, esi
mov ecx, edi
mov dword [ebx + 4], eax
call fcn.00579490
mov ecx, dword [ebx]
lea edx, [esp + 0x10]
add ecx, 0x24
push 0
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, esi
push edx
mov dword [ebx + 4], eax
mov eax, dword [edi + 0xd0]
mov esi, dword [edi + 0xbc]
mov ecx, dword [edi + 0x38]
sub esi, eax
add eax, ecx
sub esi, ecx
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x5791db
mov ecx, dword [ebx]
add ecx, eax
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, 0
mov dword [ebx + 4], eax
jmp 0x578e55
mov eax, dword [edi + 0xb0]
mov esi, dword [edi + 0xb4]
mov ebp, dword [esp + 0x18]
lea ecx, [esp + 0x10]
sub esi, eax
push 0
push ecx
add eax, 0xfffffff8
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x5791db
mov ebx, dword [esp + 0x20]
mov esi, 0
push ebp
mov ecx, dword [ebx]
add ecx, eax
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, esi
mov ecx, edi
mov dword [ebx + 4], eax
call fcn.00579490
mov ecx, dword [ebx]
lea edx, [esp + 0x10]
add ecx, 0x24
push 0
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, esi
push edx
mov dword [ebx + 4], eax
mov eax, dword [edi + 0xb4]
mov esi, dword [edi + 0xbc]
sub esi, eax
add eax, 0xfffffff8
add esi, 8
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x5791db
mov ecx, dword [ebx]
add ecx, eax
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, 0
mov dword [ebx + 4], eax
mov esi, dword [edi + 0x2c]
mov ecx, dword [edi + 0xc0]
lea eax, [esp + 0x10]
push 0
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x5791db
mov ecx, dword [ebx]
add ecx, eax
mov dword [ebx], ecx
mov ebp, dword [ebx + 4]
adc ebp, 0
mov dword [ebx + 4], ebp
mov eax, dword [edi + 0x50]
mov esi, dword [edi + 0x74]
mov edx, dword [edi + 0x4c]
mov ecx, dword [edi + 0x48]
mov ebp, dword [edi + 0x44]
add eax, esi
mov esi, dword [edi + 0x40]
add eax, edx
add eax, ecx
add eax, ebp
add eax, esi
push eax
mov dword [esp + 0x24], eax
call fcn.005db66d
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x1c], esi
je 0x5791db
mov eax, dword [edi + 0x44]
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 + 0x9c]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [edi + 0x84]
add esi, 4
test ebp, ebp
je 0x578f2b
mov eax, dword [ebp]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebp + 4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [ebp + 8]
add esi, 4
test ebp, ebp
jne 0x578f08
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x578f86
mov eax, dword [edi + 0x40]
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 + 0xa4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [edi + 0x94]
add esi, 4
test ebp, ebp
je 0x578f86
mov eax, dword [ebp + 8]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [ebp + 0xc]
add esi, 4
test ebp, ebp
jne 0x578f71
mov eax, dword [edi + 0x74]
test eax, eax
je 0x578fea
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 + 0x80]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [edi + 0x78]
add esi, 4
test ebp, ebp
je 0x578fea
mov eax, dword [ebp]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebp + 4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [ebp + 8]
add esi, 4
test ebp, ebp
jne 0x578fc7
mov eax, dword [edi + 0x48]
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 + 0xa0]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [edi + 0x8c]
add esi, 4
test ebp, ebp
je 0x57905b
mov eax, dword [ebp]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebp + 4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [ebp + 8]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [ebp + 0xc]
add esi, 4
test ebp, ebp
jne 0x57902a
mov eax, dword [edi + 0x4c]
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 + 0x54]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x54]
add esi, 4
xor ebp, ebp
test eax, eax
jbe 0x5790bb
mov ecx, dword [edi + 0x58]
mov eax, dword [ecx + ebp*4]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0x54]
add esi, 4
inc ebp
cmp ebp, eax
jb 0x5790a2
mov eax, dword [edi + 0x50]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov eax, dword [edi + 0xa8]
add esi, 4
test eax, eax
mov eax, str.co64
jne 0x5790dd
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 + 0xa4]
push eax
add esi, 4
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [edi + 0x94]
add esi, 4
test ebp, ebp
je 0x579145
mov eax, dword [edi + 0xa8]
test eax, eax
je 0x579130
mov eax, dword [ebp]
mov edx, dword [ebp + 4]
mov ecx, 0x20
call fcn.005c6de0
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
add esi, 4
mov eax, dword [ebp]
push eax
call sub.WS2_32.dll_htonl
mov dword [esi], eax
mov ebp, dword [ebp + 0xc]
add esi, 4
test ebp, ebp
jne 0x57910b
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
push ebp
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp ebp, eax
jne 0x5791db
mov ebp, dword [ebx]
push esi
add ebp, eax
mov dword [ebx], ebp
mov edx, dword [ebx + 4]
adc edx, 0
mov dword [ebx + 4], edx
call fcn.005db696
mov ecx, dword [edi + 0xbc]
mov edx, dword [edi + 0x28]
mov eax, dword [edi + 0xb0]
mov edi, dword [edi + 0x1c]
lea esi, [ecx + edx]
add esp, 4
lea ebp, [eax + edi]
cmp ebp, esi
jbe 0x5791db
sub eax, ecx
push 0
sub eax, edx
lea edx, [esp + 0x14]
add eax, edi
push edx
mov edi, eax
mov eax, dword [esp + 0x20]
add esi, 0xfffffff8
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5791db
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x5791db
mov ecx, dword [ebx]
add ecx, eax
mov dword [ebx], ecx
mov eax, dword [ebx + 4]
adc eax, 0
mov dword [ebx + 4], eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc