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

Disassembly:
sub esp, 0x50
mov eax, dword [0x616930]
xor eax, esp
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], ecx
push ebx
mov ebx, 5
push ebp
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0xc], ebp
push esi
push edi
mov edi, dword [esp + 0x68]
mov dword [esp + 0x44], edi
test eax, eax
je 0x597501
mov dword [eax], 0
test ecx, ecx
je 0x59750b
mov dword [ecx], 0
xor esi, esi
mov dword [esp + 0x2c], esi
test ebp, ebp
jne 0x597520
call fcn.00599a60
mov ebp, eax
mov dword [esp + 0x14], eax
test edi, edi
je 0x597526
mov dword [edi], esi
test ebp, ebp
je 0x597879
mov eax, dword [ebp + 0x3c]
or edi, 0xffffffff
mov dword [esp + 0x24], edi
test eax, eax
je 0x59787e
lea edx, [eax + ebp]
mov byte [esp + 0x13], 0
movzx eax, word [edx + 6]
mov dword [esp + 0x34], eax
movzx eax, word [edx + 0x14]
add eax, 0x18
mov dword [esp + 0x30], edx
add eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [edx]
xor eax, 0x75652121
cmp eax, 0x75656471
jne 0x59787e
cmp dword [edx + 0x74], 1
jb 0x597872
mov ecx, dword [edx + 0x80]
mov eax, dword [edx + 0x84]
test ecx, ecx
je 0x597868
test eax, eax
je 0x597861
cmp eax, 0x14
jb 0x597848
lea ebx, [ecx + eax]
mov byte [esp + 0x12], 0
lea edx, [ecx + ebp]
add ebx, ebp
xor ecx, ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ecx
cmp byte [esp + 0x7c], cl
je 0x59760a
mov eax, ebp
xor eax, 0x8a9adede
cmp dword [0x6253e4], eax
jne 0x59760a
cmp dword [0x6253d8], ecx
je 0x59760a
mov eax, dword [0x6253d8]
xor eax, 0x8a9adede
je 0x59760a
mov ecx, dword [eax]
test ecx, ecx
je 0x597608
mov eax, dword [eax + 4]
test eax, eax
je 0x597608
xor ecx, 0x8a9adede
mov ebx, eax
xor ebx, 0x8a9adede
add ebx, ecx
add ebx, ebp
lea edx, [ecx + ebp]
mov dword [esp + 0x28], ebx
xor ecx, ecx
lea esi, [edx + 0x10]
mov dword [esp + 0x20], esi
lea eax, [esi - 0x10]
cmp eax, ebx
jae 0x597806
mov eax, dword [esi - 4]
test eax, eax
je 0x597806
add eax, ebp
push eax
mov dword [esp + 0x44], eax
call fcn.0059db60
test eax, eax
je 0x59780e
mov ecx, dword [esi - 0x10]
test ecx, ecx
jne 0x59764a
cmp dword [esi], ecx
je 0x59780e
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 0x20]
mov edi, dword [esi]
add eax, edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], edx
lea eax, [edi + ebp]
neg edi
sbb edi, edi
and edi, eax
test ecx, ecx
je 0x597670
add ecx, ebp
jmp 0x5977c1
xor ecx, ecx
test edi, edi
je 0x5977c1
nop word [eax + eax]
cmp byte [edi + ecx], 0
je 0x597689
inc ecx
jmp 0x597680
test ecx, ecx
setne al
xor ebx, ebx
cmp byte [esp + 0x7c], bl
movzx eax, al
cmove ebx, eax
test bl, bl
je 0x5977bb
lea ebp, [ecx*4]
xor bl, bl
push 4
mov eax, ebp
and eax, 0xfffff000
push 0x101000
add eax, 0x1000
push eax
push 0
call fcn.0059d7f0
cmp dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x18], eax
jne 0x5977b3
test eax, eax
je 0x5977b3
push dword [esp + 0x14]
call fcn.00596cb0
mov esi, eax
test esi, esi
je 0x5977ad
call fcn.0059a6e0
test eax, eax
je 0x5977ad
push 0
push 0
push 3
push 0
push 3
push closesocket
push esi
call eax
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
je 0x5977ad
mov eax, dword [esp + 0x30]
push dword [eax + 0x38]
mov eax, edi
push dword [esp + 0x38]
sub eax, dword [esp + 0x1c]
push dword [esp + 0x40]
push eax
call fcn.0059dc70
mov esi, eax
test esi, esi
je 0x5977af
call fcn.0059ad90
test eax, eax
je 0x5977ad
push 0
lea ecx, [esp + 0x5c]
mov dword [esp + 0x58], esi
push ecx
push esi
mov esi, dword [esp + 0x30]
push esi
mov dword [esp + 0x68], 0
call eax
cmp eax, dword [esp + 0x54]
jne 0x5977a2
call fcn.0059acf0
test eax, eax
je 0x5977a2
push 0
lea ecx, [esp + 0x54]
mov dword [esp + 0x54], 0
push ecx
push ebp
push dword [esp + 0x24]
push esi
call eax
test eax, eax
je 0x59779a
cmp dword [esp + 0x50], ebp
mov ecx, 1
movzx ebx, bl
cmove ebx, ecx
mov dword [esp + 0x50], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x54], xmm0
jmp 0x5977af
xor bl, bl
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
xor ecx, ecx
test bl, bl
je 0x59780e
push dword [esp + 0x78]
lea eax, [esp + 0x30]
test ecx, ecx
push dword [esp + 0x78]
push dword [esp + 0x44]
push dword [esp + 0x4c]
push dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x30]
push 1
push dword [esp + 0x64]
cmovne eax, ecx
push edx
push edx
push edi
push eax
push ebp
call fcn.00597200
mov ecx, dword [esp + 0x18]
mov bl, byte [esp + 0x12]
test al, al
je 0x597816
mov byte [esp + 0x13], 1
jmp 0x597816
mov bl, 1
mov byte [esp + 0x12], bl
jmp 0x597816
mov ecx, dword [esp + 0x18]
mov bl, byte [esp + 0x12]
add esi, 0x14
mov dword [esp + 0x20], esi
test ecx, ecx
je 0x597834
push 0x8000
push 0
push ecx
call fcn.0059d860
xor ecx, ecx
mov dword [esp + 0x18], ecx
test bl, bl
mov ebx, dword [esp + 0x28]
je 0x597611
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
xor ebx, ebx
cmp byte [esp + 0x13], bl
setne bl
add ebx, 6
cmp edi, 0xffffffff
je 0x59787e
push edi
call fcn.005992c0
jmp 0x59787e
mov ebx, 3
jmp 0x59787e
xor ebx, ebx
test eax, eax
setne bl
inc ebx
jmp 0x59787e
mov ebx, 1
jmp 0x59787e
mov ebx, 8
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x597888
mov dword [eax], esi
mov ecx, dword [esp + 0x5c]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005bca10
add esp, 0x50
ret 0x1c