Function at 0x4134f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5958db
mov eax, dword fs:[0]
push eax
sub esp, 0x434
mov eax, dword [0x600d40]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edi, ecx
mov dword [ebp - 0x424], eax
push 0
push 0
push 0
mov eax, 1
push 0
mov dword [ebp - 4], eax
push 0x5c9ee0
mov dword [edi + 4], 0
mov dword [ebp - 0x418], eax
call dword [0x59b948]
mov ebx, eax
mov dword [ebp - 0x430], ebx
test ebx, ebx
jne 0x4135b8
push str.connect_to_port__d
call fcn.0041f1e0
mov byte [ebp - 4], bl
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41358b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4135b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x41385f
test esi, esi
je 0x4135d2
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x424]
push 0xa
push ecx
push edx
push eax
call esi
add esp, 0x10
mov ecx, dword [ebp + 0xc]
push 0
push 0x4000000
push 0
push 0
push ecx
push ebx
call dword [0x59b920]
mov dword [ebp - 0x42c], eax
test eax, eax
je 0x41387c
push 0
push 0
lea edx, [ebp - 0x43c]
push edx
push eax
mov dword [ebp - 0x41c], 1
call dword [0x59b91c]
mov edx, dword [ebp - 0x42c]
xor ebx, ebx
push ebx
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x428]
push ecx
push 0x20000005
push edx
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x434], 4
call dword [0x59b918]
test eax, eax
jne 0x41364f
mov dword [ebp - 0x428], ebx
push 0x5c9f24
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x420]
push ecx
call fcn.00409110
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x420]
add esp, 8
add eax, 0xfffffff0
mov dword [ebp - 0x438], esp
mov ebx, esp
push eax
call fcn.004090a0
add eax, 0x10
add esp, 4
mov dword [ebx], eax
call fcn.0041d220
mov edx, dword [ebp - 0x420]
push 0x5c9f30
push edx
call fcn.005669d4
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x413767
cmp dword [ebp - 0x41c], 0
jbe 0x413755
lea ebx, [ebx]
mov edx, dword [ebp - 0x42c]
lea eax, [ebp - 0x41c]
push eax
push 0x3ff
lea ecx, [ebp - 0x414]
push ecx
push edx
call dword [0x59b914]
test eax, eax
je 0x41374b
mov eax, dword [ebp - 0x41c]
test eax, eax
je 0x413701
push ebx
push eax
lea eax, [ebp - 0x414]
push 1
push eax
call fcn.00566b42
add esp, 0x10
add dword [edi + 4], 0x3ff
mov eax, dword [edi + 4]
test esi, esi
je 0x41373c
mov ecx, dword [ebp - 0x428]
test ecx, ecx
je 0x41373c
cmp ecx, eax
jbe 0x41373c
imul eax, eax, 0x5a
xor edx, edx
div ecx
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
add eax, 0xa
push eax
mov eax, dword [ebp - 0x424]
push ecx
push edx
push eax
call esi
add esp, 0x10
cmp dword [ebp - 0x41c], 0
ja 0x4136c0
jmp 0x413755
mov dword [ebp - 0x418], 0
push ebx
call fcn.00566c29
add esp, 4
cmp dword [ebp - 0x418], 0
je 0x4137ad
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x438], esp
mov edi, esp
push eax
call fcn.004090a0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.0041ce90
add esp, 4
test eax, eax
je 0x41379a
mov ecx, dword [ebp + 8]
push ecx
call dword [0x59b25c]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x420]
push edx
push eax
call fcn.00566c9d
add esp, 8
mov ecx, dword [ebp - 0x42c]
push ecx
call dword [0x59b944]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x420]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4137e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x430]
push ebx
call dword [0x59b944]
test esi, esi
je 0x413810
cmp dword [ebp - 0x418], 0
je 0x413810
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x424]
push 0x64
push ecx
push edx
push eax
call esi
add esp, 0x10
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413833
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413859
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x418]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00564dd2
mov esp, ebp
pop ebp
ret 0x14
mov dword [ebp - 0x418], 0
jmp 0x4137e6