Function at 0x59c500
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x27c
mov eax, dword [0x64e0a0]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push esi
lea eax, [esp + 0x70]
mov dword [esp + 0x64], eax
push edi
lea eax, [esp + 0x68]
push eax
movzx eax, byte [0x65c1e4]
mov edi, edx
push eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x74], 0x104
mov dword [esp + 0x78], 0
call fcn.005b0e80
add esp, 8
sub eax, 0
je 0x59c632
dec eax
mov eax, dword [esp + 0x68]
je 0x59c582
lea ecx, [esp + 0x74]
cmp eax, ecx
je 0x59c70a
test eax, eax
je 0x59c70a
push eax
call fcn.00541b50
add esp, 4
jmp 0x59c70a
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push closesocket
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x58], esi
call dword [0x649010]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x59c60e
lea ebx, [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x59c5c0
cmp eax, 2
jne 0x59c605
test esi, esi
jle 0x59c605
mov eax, esi
cmp esi, 0xc8
jl 0x59c5d3
mov eax, 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push dword [esp + 0x28]
sub esi, 0xc8
call dword [0x649010]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x59c5b0
jmp 0x59c60e
lea eax, [ebx + 1]
neg eax
sbb eax, eax
and ebx, eax
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x74]
cmp eax, ecx
je 0x59c627
test eax, eax
je 0x59c627
push eax
call fcn.00541b50
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x59c706
push dword [esp + 0x68]
lea eax, [esp + 0x34]
xor ebx, ebx
push eax
xor esi, esi
mov dword [esp + 0x40], ebx
call fcn.0041e890
lea eax, [esp + 0x30]
mov dword [esp + 0x18], 0x18
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], 0x40
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
lea esp, [esp]
push 0
push 0
push 0x20
push 1
push 1
push 0x80
push 0
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x38]
push eax
push 0x80100080
lea eax, [esp + 0x3c]
push eax
call fcn.0041edd6
mov edi, eax
test edi, edi
jns 0x59c6d2
cmp edi, 0xc0000043
je 0x59c6b0
cmp edi, 0xc000000f
jne 0x59c6d2
test esi, esi
jle 0x59c6d2
mov eax, esi
cmp esi, 0xc8
jl 0x59c6c3
mov eax, 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 0xc8
jmp 0x59c670
push edi
call fcn.0041e908
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push eax
call esi
test edi, edi
js 0x59c6e9
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x74]
cmp eax, ecx
je 0x59c702
test eax, eax
je 0x59c702
push eax
call fcn.00541b50
add esp, 4
mov edi, dword [esp + 0x10]
test ebx, ebx
jne 0x59c72f
test edi, edi
je 0x59c823
mov dword [edi], 0xa
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
push 0x1e
lea edx, [esp + 0x4c]
mov ecx, ebx
call fcn.005b1af0
add esp, 4
cmp eax, 0x1e
je 0x59c79a
test edi, edi
je 0x59c74e
mov dword [edi], 0xa
cmp byte [0x65c1e4], 0
push ebx
je 0x59c77d
call fcn.0041e90e
push eax
call fcn.0041e908
push eax
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
call dword [0x649008]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
cmp byte [0x65c1e4], 0
push ebx
je 0x59c7b4
call fcn.0041e90e
push eax
call fcn.0041e908
push eax
call esi
jmp 0x59c7ba
call dword [0x649008]
cmp dword [esp + 0x48], 0x4034b50
jne 0x59c819
cmp word [esp + 0x4c], 0x14
jne 0x59c7f8
cmp word [esp + 0x50], 8
jne 0x59c7f8
test edi, edi
je 0x59c7de
mov dword [edi], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x59c823
mov dword [edi], 7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x59c823
mov dword [edi], 0
mov ecx, dword [esp + 0x284]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00541b41
mov esp, ebp
pop ebp
ret