Function at 0x58a1f0
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebp
push esi
mov esi, ecx
mov ebp, dword [esi + 0x44]
sub ebp, dword [esi + 0x30]
push edi
mov edi, dword [esi + 0xe0]
test edi, edi
je 0x58a8e7
cmp dword [esi + 0xe4], 0
je 0x58a8e7
cmp dword [esi + 0xe8], 0
je 0x58a8e7
cmp dword [esi + 0xec], 0
je 0x58a8e7
mov eax, dword [esi + 0x88]
sub eax, dword [esi + 0x40]
add eax, dword [esi + 0x24]
add eax, ebp
push eax
call sub.WS2_32.dll_htonl
mov dword [edi - 8], eax
mov eax, dword [esi + 0x28]
mov edi, dword [esi + 0xe4]
add eax, ebp
push eax
sub edi, 8
call sub.WS2_32.dll_htonl
mov dword [edi], eax
mov eax, dword [esi + 0x2c]
mov edi, dword [esi + 0xe8]
add eax, ebp
push eax
sub edi, 8
call sub.WS2_32.dll_htonl
mov dword [edi], eax
mov eax, dword [esi + 0x44]
mov edi, dword [esi + 0xec]
push eax
sub edi, 8
call sub.WS2_32.dll_htonl
mov dword [edi], eax
cmp dword [esi + 0x90], 0
jne 0x58a2ce
mov eax, dword [esi + 0x14]
cmp eax, 0x40
je 0x58a2ce
cmp eax, 0x80
je 0x58a2ce
mov ecx, dword [esi + 8]
cmp ecx, 0x3e8
je 0x58a341
test ecx, ecx
je 0x58a341
mov eax, dword [esi + 0x7c]
mov edx, 0x3e8
mul edx
push 0
push ecx
push edx
push eax
call fcn.005fc580
inc eax
jmp 0x58a33e
cmp dword [esi + 0x78], 0
jne 0x58a2dd
mov eax, dword [esi + 0x80]
mov dword [esi + 0x78], eax
mov ecx, dword [esi + 0xc]
cmp ecx, 0x3e8
jne 0x58a2ee
cmp dword [esi + 0x78], 0
jne 0x58a30d
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x58a30d
test ecx, ecx
je 0x58a30d
mov edx, 0x3e8
mul edx
push 0
push ecx
push edx
push eax
call fcn.005fc580
mov dword [esi + 0x78], eax
mov eax, dword [esi + 0x14]
cmp eax, 0x40
je 0x58a31c
cmp eax, 0x80
jne 0x58a341
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x58a341
mov eax, dword [esi + 0x84]
test eax, eax
je 0x58a341
mov edx, 0x3e8
mul edx
push 0
push ecx
push edx
push eax
call fcn.005fc580
mov dword [esi + 0x78], eax
mov eax, dword [esi + 0xf8]
test eax, eax
je 0x58a373
mov ecx, dword [esi + 0x78]
push ecx
add eax, 0x14
push eax
mov ecx, esi
call fcn.00588c70
cmp dword [esi + 0x64], 0
jne 0x58a373
mov edx, dword [esi + 0xf8]
push 1
add edx, 0x20
push edx
mov ecx, esi
call fcn.00588c70
mov eax, dword [esi + 0x100]
test eax, eax
je 0x58a3a4
cmp byte [eax], 0
jne 0x58a393
mov ecx, dword [esi + 0x7c]
push ecx
add eax, 0x10
push eax
mov ecx, esi
call fcn.00588c70
jmp 0x58a3a4
mov edx, dword [esi + 0x7c]
push 0
push edx
add eax, 0x18
push eax
mov ecx, esi
call fcn.00588c90
mov eax, dword [esi + 0xf8]
test eax, eax
je 0x58a3ce
push 0xf
push eax
mov ecx, esi
call fcn.00588c70
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0xf8]
add ecx, 0xc
push eax
push ecx
mov ecx, esi
call fcn.00588c70
mov eax, dword [esi + 0x104]
push ebx
test eax, eax
je 0x58a45e
cmp dword [esi + 0xe4], eax
jbe 0x58a45e
mov ecx, dword [esi + 0xe0]
mov ebx, dword [esp + 0x18]
sub eax, ecx
push 0
add eax, 8
lea edx, [esp + 0x14]
push edx
mov edi, eax
push edi
add ecx, 0xfffffff8
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x58a8e6
mov ebp, dword [esp + 0x20]
add dword [ebp], eax
mov edi, 0
push ebx
adc dword [ebp + 4], edi
mov ecx, esi
call fcn.00589e90
mov eax, dword [esi + 0x88]
add dword [ebp], eax
push 0
lea edx, [esp + 0x14]
adc dword [ebp + 4], edi
mov eax, dword [esi + 0x104]
mov edi, dword [esi + 0xec]
mov ecx, dword [esi + 0x40]
sub edi, eax
sub edi, ecx
push edx
add eax, ecx
jmp 0x58a4d5
mov eax, dword [esi + 0xe0]
mov edi, dword [esi + 0xe4]
mov ebx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
sub edi, eax
push edi
add eax, 0xfffffff8
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x58a8e6
mov ebp, dword [esp + 0x20]
add dword [ebp], eax
mov edi, 0
push ebx
adc dword [ebp + 4], edi
mov ecx, esi
call fcn.00589e90
mov edx, dword [esi + 0x88]
add dword [ebp], edx
push 0
lea ecx, [esp + 0x14]
adc dword [ebp + 4], edi
mov eax, dword [esi + 0xe4]
mov edi, dword [esi + 0xec]
sub edi, eax
add edi, 8
push ecx
add eax, 0xfffffff8
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x58a8e6
add dword [ebp], eax
push 0
lea edx, [esp + 0x14]
adc dword [ebp + 4], 0
mov edi, dword [esi + 0x34]
mov eax, dword [esi + 0xf0]
push edx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x58a8e6
add dword [ebp], eax
adc dword [ebp + 4], 0
mov eax, dword [esi + 0x8c]
add eax, dword [esi + 0x54]
add eax, dword [esi + 0x50]
add eax, dword [esi + 0x4c]
add eax, dword [esi + 0x48]
add eax, dword [esi + 0x58]
push eax
mov dword [esp + 0x24], eax
call fcn.005cfaa6
mov ebx, eax
add esp, 4
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x58a8e6
mov ecx, dword [esi + 0x4c]
push ecx
push ebx
mov ecx, esi
call fcn.00588c70
mov edi, eax
add edi, ebx
mov dword [edi], 0x73747473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.00588c70
mov edx, dword [esi + 0xc0]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [esi + 0xa8]
add edi, eax
test ebx, ebx
je 0x58a5c2
lea ecx, [ecx]
mov eax, dword [ebx]
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov ecx, dword [ebx + 4]
push ecx
add edi, eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [ebx + 8]
add edi, eax
test ebx, ebx
jne 0x58a5a0
cmp dword [esi + 0x64], 0
je 0x58a61b
mov edx, dword [esi + 0x48]
push edx
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov dword [edi], 0x73737473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov eax, dword [esi + 0xc8]
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [esi + 0xb8]
add edi, eax
test ebx, ebx
je 0x58a61b
mov ecx, dword [ebx + 8]
push ecx
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [ebx + 0xc]
add edi, eax
test ebx, ebx
jne 0x58a606
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x58a682
push eax
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov dword [edi], 0x73747463
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.00588c70
mov edx, dword [esi + 0xa4]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [esi + 0x9c]
add edi, eax
test ebx, ebx
je 0x58a682
mov eax, dword [ebx]
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov ecx, dword [ebx + 4]
push ecx
add edi, eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [ebx + 8]
add edi, eax
test ebx, ebx
jne 0x58a660
mov edx, dword [esi + 0x50]
push edx
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov dword [edi], 0x63737473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov eax, dword [esi + 0xc4]
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [esi + 0xb0]
add edi, eax
test ebx, ebx
je 0x58a6f0
mov ecx, dword [ebx]
push ecx
push edi
mov ecx, esi
call fcn.00588c70
mov edx, dword [ebx + 4]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov eax, dword [ebx + 8]
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [ebx + 0xc]
add edi, eax
test ebx, ebx
jne 0x58a6c0
mov ecx, dword [esi + 0x54]
push ecx
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
mov dword [edi], 0x7a737473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
push 0
push edi
mov ecx, esi
call fcn.00588c70
mov edx, dword [esi + 0x5c]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.00588c70
xor ebx, ebx
add edi, eax
cmp dword [esi + 0x5c], ebx
jbe 0x58a74b
mov eax, dword [esi + 0x60]
mov ecx, dword [eax + ebx*4]
push ecx
push edi
mov ecx, esi
call fcn.00588c70
inc ebx
add edi, eax
cmp ebx, dword [esi + 0x5c]
jb 0x58a734
mov edx, dword [esi + 0x58]
push edx
push edi
mov ecx, esi
call fcn.00588c70
add edi, eax
cmp dword [esi + 0xcc], 0
mov eax, str.co64
jne 0x58a76c
mov eax, str.stco
mov eax, dword [eax]
mov dword [edi], eax
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.00588c70
mov ecx, dword [esi + 0xc8]
push ecx
add edi, eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [esi + 0xb8]
add edi, eax
test ebx, ebx
je 0x58a7d7
lea ebx, [ebx]
cmp dword [esi + 0xcc], 0
mov eax, dword [ebx]
je 0x58a7c5
mov edx, dword [ebx + 4]
mov cl, 0x20
call fcn.00600710
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov edx, dword [ebx]
add edi, eax
push edx
jmp 0x58a7c6
push eax
push edi
mov ecx, esi
call fcn.00588c70
mov ebx, dword [ebx + 0xc]
add edi, eax
test ebx, ebx
jne 0x58a7a0
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x58a8e6
add dword [ebp], eax
push edi
adc dword [ebp + 4], 0
call fcn.005cfa9b
mov ecx, dword [esi + 0xe0]
mov edi, dword [esi + 0xec]
mov ebx, dword [esi + 0x30]
mov eax, dword [esi + 0x24]
mov dword [esp + 0x24], ecx
lea edx, [edi + ebx]
add ecx, eax
add esp, 4
cmp ecx, edx
jbe 0x58a8e6
mov ecx, dword [esi + 0x104]
test ecx, ecx
je 0x58a8b2
cmp edx, ecx
jae 0x58a8b2
lea eax, [edx - 8]
cmp eax, ecx
jae 0x58a882
sub ecx, edi
sub ecx, ebx
add ecx, 8
push 0
mov edi, ecx
lea ecx, [esp + 0x14]
push ecx
push edi
add edx, 0xfffffff8
push edx
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x58a8e6
add dword [ebp], eax
adc dword [ebp + 4], 0
mov ecx, dword [esi + 0xe0]
mov eax, dword [esi + 0x24]
mov edx, dword [esi + 0x104]
mov esi, dword [esi + 0x40]
lea edi, [edx + esi]
lea ebx, [eax + ecx - 8]
cmp ebx, edi
jbe 0x58a8e6
sub eax, edx
sub eax, esi
lea esi, [eax + ecx - 8]
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
jmp 0x58a8c8
sub eax, edi
sub eax, ebx
add eax, dword [esp + 0x20]
push 0
mov esi, eax
lea eax, [esp + 0x14]
push eax
push esi
add edx, 0xfffffff8
push edx
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a8e6
mov eax, dword [esp + 0x10]
cmp esi, eax
jne 0x58a8e6
add dword [ebp], eax
adc dword [ebp + 4], 0
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret 0xc