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

Disassembly:
sub esp, 0x180
mov eax, dword [0x64786c]
xor eax, esp
mov dword [esp + 0x17c], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x190]
push edi
movsx edi, word [esp + 0x1ac]
mov dword [esp + 0x88], esi
mov eax, 0xfffffff6
mov ecx, eax
shl ecx, 0xa
movzx ecx, cx
lea edx, [ecx + 0x400]
movzx edx, dx
test eax, eax
jle 0x596040
sub ecx, 0x66
sub edx, 0x66
jmp 0x596052
jne 0x596047
sub edx, 0x66
jmp 0x596052
add ecx, 0x66
cmp eax, 0xffffffff
je 0x596052
add edx, 0x66
movsx ecx, cx
movsx edx, dx
imul ecx, edi
imul edx, edi
sar ecx, 0x10
sar edx, 0x10
mov dword [esp + eax*4 + 0xc4], ecx
mov dword [esp + eax*4 + 0x114], edx
inc eax
cmp eax, 9
jle 0x596023
xor eax, eax
mov word [esp + 0x13c], ax
movsx eax, word [esp + 0x1b8]
lea edx, [eax - 1]
xor ecx, ecx
mov ebp, 1
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], edx
test edx, edx
jl 0x5964c0
mov eax, dword [esp + 0x198]
mov edi, dword [esp + 0x19c]
mov esi, dword [esp + 0x1a4]
sub edi, eax
lea ecx, [esp + edx + 0x14c]
sub esi, eax
mov dword [esp + 0x10], ecx
lea ecx, [eax + edx*2]
mov eax, dword [esp + 0x1a0]
mov dword [esp + 0x64], edi
lea edi, [esp + 0x14c]
sub eax, edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x84], esi
mov dword [esp + 0x7c], eax
jmp 0x59610b
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x84]
movsx edi, word [esi + ecx]
add edi, dword [esp + 0x1a8]
movsx ebx, word [ecx]
xor esi, esi
mov dword [esp + 0x50], edi
test ebp, ebp
jle 0x5962a4
mov edx, dword [esp + 0x10]
movzx eax, byte [eax + edx]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x64]
movsx ecx, word [eax + ecx]
mov dword [esp + 0x20], ecx
lea eax, [esp + ebp*4 + 0x30]
lea ecx, [esp + ebp*2 + 0x13c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
jmp 0x596164
mov edi, dword [esp + 0x50]
movsx ecx, word [esp + esi*2 + 0x13c]
imul ecx, dword [esp + 0x78]
sar ecx, 8
mov edx, ebx
sub edx, ecx
movsx eax, dx
movsx edx, word [esp + 0x1b0]
imul eax, edx
sar eax, 0x10
cmp eax, 9
jle 0x596195
mov eax, 9
jmp 0x59619f
cmp eax, 0xfffffff6
jge 0x59619f
mov eax, 0xfffffff6
mov edx, dword [esp + 0x14]
mov byte [edx], al
movzx edx, word [esp + eax*4 + 0xc4]
add dx, cx
movzx ebp, dx
movzx edx, word [esp + eax*4 + 0x114]
add dx, cx
movzx ecx, dx
mov edx, dword [esp + 0x18]
mov word [esp + esi*2 + 0x13c], bp
mov dword [esp + 0x80], ecx
mov word [edx], cx
lea ecx, [eax + 1]
cmp ecx, 4
jl 0x5961fb
jne 0x5961ed
movzx ecx, byte [eax + edi + 4]
mov edi, 0x118
jmp 0x596227
movsx ecx, ax
imul ecx, ecx, 0x2b
add ecx, 0x6c
lea edi, [ecx + 0x2b]
jmp 0x596227
cmp eax, 0xfffffffc
jg 0x59621d
jne 0x59620d
movzx edi, byte [edi + 1]
mov ecx, 0x118
jmp 0x596227
cwde
imul eax, eax, 0x2b
mov ecx, 0x6c
sub ecx, eax
lea edi, [ecx - 0x2b]
jmp 0x596227
movzx ecx, byte [eax + edi + 4]
movzx edi, byte [eax + edi + 5]
mov edx, dword [esp + esi*4 + 0x30]
movsx ebp, bp
mov eax, ebx
sub eax, ebp
movsx ebp, cx
movsx ecx, word [esp + 0x1b4]
imul ebp, ecx
mov ecx, dword [esp + 0x20]
cwde
imul ecx, eax
imul ecx, eax
add ebp, edx
add ecx, ebp
mov dword [esp + esi*4 + 0x30], ecx
movsx ecx, word [esp + 0x80]
mov eax, ebx
sub eax, ecx
movsx ecx, word [esp + 0x1b4]
movsx edi, di
imul edi, ecx
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
cwde
add dword [esp + 0x14], 0x10
imul ecx, eax
add dword [esp + 0x18], 2
imul ecx, eax
mov eax, dword [esp + 0x2c]
add edi, edx
add ecx, edi
mov dword [eax], ecx
inc esi
add eax, 4
cmp esi, ebp
mov dword [esp + 0x2c], eax
jl 0x596160
mov edx, dword [esp + 0x1c]
cmp ebp, 2
jg 0x596314
test ebp, ebp
jle 0x5962d2
mov eax, dword [esp + 0x10]
mov ecx, ebp
shl ecx, 4
add ecx, edx
lea ecx, [esp + ecx + 0x14c]
mov edi, ebp
mov bl, byte [eax]
inc bl
mov byte [ecx], bl
add eax, 0x10
add ecx, 0x10
sub edi, 1
jne 0x5962c1
add ebp, ebp
cmp ebp, 4
mov dword [esp + 0x24], ebp
jge 0x596499
mov ecx, dword [esp + 0x10]
mov eax, ebp
shl eax, 4
add eax, edx
lea edi, [esp + eax + 0x14c]
mov eax, 4
sub eax, ebp
lea ebx, [ebx]
mov bl, byte [ecx]
mov byte [edi], bl
add ecx, 0x10
add edi, 0x10
sub eax, 1
jne 0x596300
jmp 0x596499
xor eax, eax
mov ecx, dword [esp + eax*4 + 0x40]
mov edx, dword [esp + eax*4 + 0x30]
cmp edx, ecx
jle 0x596360
mov dword [esp + eax*4 + 0x8c], ecx
mov dword [esp + eax*4 + 0x30], ecx
mov ecx, edx
mov dword [esp + eax*4 + 0x40], ecx
movzx ecx, word [esp + eax*2 + 0x13c]
mov dword [esp + eax*4 + 0x54], edx
mov dx, word [esp + eax*2 + 0x144]
mov word [esp + eax*2 + 0x144], cx
lea ecx, [eax + 4]
mov word [esp + eax*2 + 0x13c], dx
mov dword [esp + eax*4 + 0x68], ecx
jmp 0x59636f
mov dword [esp + eax*4 + 0x8c], edx
mov dword [esp + eax*4 + 0x54], ecx
mov dword [esp + eax*4 + 0x68], eax
inc eax
cmp eax, 4
jl 0x596316
mov ebx, dword [esp + 0x54]
mov edi, bind
xor edx, edx
xor ecx, ecx
xor eax, eax
cmp ebx, edi
jge 0x59638a
mov edi, ebx
mov ebx, dword [esp + 0x8c]
test ebx, ebx
jle 0x596399
mov edx, ebx
xor eax, eax
mov ebx, dword [esp + 0x58]
cmp edi, ebx
jle 0x5963a8
mov edi, ebx
mov ecx, 1
mov ebx, dword [esp + 0x90]
cmp edx, ebx
jge 0x5963ba
mov edx, ebx
mov eax, 1
mov ebx, dword [esp + 0x5c]
cmp edi, ebx
jle 0x5963c9
mov edi, ebx
mov ecx, 2
mov ebx, dword [esp + 0x94]
cmp edx, ebx
jge 0x5963db
mov edx, ebx
mov eax, 2
mov ebx, dword [esp + 0x60]
cmp edi, ebx
jle 0x5963ea
mov edi, ebx
mov ecx, 3
mov ebx, dword [esp + 0x98]
cmp edx, ebx
jge 0x5963fc
mov edx, ebx
mov eax, 3
cmp edi, edx
jge 0x59646a
mov edx, dword [esp + ecx*4 + 0x68]
xor edx, 4
mov dword [esp + eax*4 + 0x68], edx
mov edx, dword [esp + ecx*4 + 0x40]
mov dword [esp + eax*4 + 0x30], edx
mov dx, word [esp + ecx*2 + 0x144]
mov word [esp + eax*2 + 0x13c], dx
mov dword [esp + ecx*4 + 0x54], connect
shl ecx, 4
mov edx, dword [esp + ecx + 0x14c]
lea ecx, [esp + ecx + 0x14c]
mov dword [esp + eax*4 + 0x8c], 0
shl eax, 4
lea eax, [esp + eax + 0x14c]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
jmp 0x596375
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
sar edx, 2
add byte [eax], dl
mov edx, dword [esp + 0x70]
sar ecx, 2
add byte [eax + 0x10], cl
mov ecx, dword [esp + 0x74]
sar edx, 2
add byte [eax + 0x20], dl
mov edx, dword [esp + 0x1c]
sar ecx, 2
add byte [eax + 0x30], cl
mov ecx, dword [esp + 0x28]
dec dword [esp + 0x10]
dec edx
sub ecx, 2
mov dword [esp + 0x1c], edx
mov dword [esp + 0x28], ecx
test edx, edx
jge 0x596100
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x88]
mov edi, bind
xor ebx, ebx
cmp ecx, edi
jge 0x5964cd
mov edi, ecx
mov eax, dword [esp + 0x34]
cmp edi, eax
jle 0x5964dc
mov edi, eax
mov ebx, 1
mov eax, dword [esp + 0x38]
cmp edi, eax
jle 0x5964eb
mov edi, eax
mov ebx, 2
mov eax, dword [esp + 0x3c]
cmp edi, eax
jle 0x5964fa
mov edi, eax
mov ebx, 3
mov eax, dword [esp + 0x40]
cmp edi, eax
jle 0x596509
mov edi, eax
mov ebx, 4
mov eax, dword [esp + 0x44]
cmp edi, eax
jle 0x596518
mov edi, eax
mov ebx, 5
mov eax, dword [esp + 0x48]
cmp edi, eax
jle 0x596527
mov edi, eax
mov ebx, 6
mov eax, dword [esp + 0x4c]
cmp edi, eax
jle 0x596536
mov edi, eax
mov ebx, 7
movsx ecx, word [esp + 0x1b8]
test ecx, ecx
jle 0x59655c
mov edx, ebx
and edx, 3
shl edx, 4
push ecx
lea eax, [esp + edx + 0x150]
push eax
push esi
call fcn.00597e30
add esp, 0xc
mov ecx, dword [esp + 0x18c]
sar ebx, 2
add byte [esi], bl
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059709c
add esp, 0x180
ret