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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x59de49
sub esp, 0x54
mov eax, dword [esp + 0x5c]
cmp eax, 2
jl 0x59db1c
mov ecx, dword [esp + 0x58]
movzx edx, byte [ecx + 1]
movzx ebx, byte [ecx]
shl ebx, 8
or edx, ebx
movzx edx, dx
mov ebx, edx
shl edx, 2
add edx, 2
cmp eax, edx
jl 0x59da62
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edx
lea eax, [0x6c4280]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], ebx
call fcn.0044bce0
mov eax, dword [esp + 0xc]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x60]
mov ebp, dword [esp + 0x58]
xor esi, esi
jmp 0x59dbb7
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp], edx
call fcn.00409720
mov eax, dword [esp + 4]
lea ecx, [0x69b600]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call fcn.00409720
mov eax, dword [esp + 4]
lea ecx, [0x69b600]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], eax
lea eax, [0x7045a4]
mov dword [esp], eax
mov dword [esp + 4], 0x36
lea eax, [esp + 0x44]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], 2
call fcn.004cde70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
add esp, 0x54
ret
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp], eax
call fcn.00409720
mov eax, dword [esp + 4]
lea ecx, [0x69b600]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
lea eax, [0x703db4]
mov dword [esp], eax
mov dword [esp + 4], 0x35
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.004cde70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
add esp, 0x54
ret
mov edi, dword [esp + 0x20]
lea esi, [edi + 1]
mov edi, dword [esp + 0x60]
mov edx, ebx
mov ebx, edi
cmp esi, ecx
jge 0x59ddf9
mov dword [esp + 0x20], esi
shl esi, 2
lea edi, [esi + 2]
cmp edx, edi
jb 0x59de3f
sub ebx, esi
add ebx, 0xfffffffe
neg ebx
sar ebx, 0x1f
and edi, ebx
mov ebx, edx
sub edx, esi
add edx, 0xfffffffe
cmp edx, 3
jbe 0x59de33
movzx edx, byte [ebp + edi + 3]
movzx esi, byte [ebp + edi + 2]
shl esi, 8
or edx, esi
movzx esi, byte [ebp + edi + 1]
shl esi, 0x10
or esi, edx
movzx edx, byte [ebp + edi]
shl edx, 0x18
or edx, esi
test edx, edx
je 0x59dba8
cmp ebx, edx
jl 0x59dd43
jb 0x59de2a
mov eax, dword [esp + 0x60]
sub eax, edx
mov esi, eax
neg eax
sar eax, 0x1f
and eax, edx
add eax, ebp
mov dword [esp], eax
sub ebx, edx
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
call fcn.0059d830
movzx eax, word [esp + 0xc]
movzx ecx, word [esp + 0xe]
movzx edx, word [esp + 0x10]
movzx ebx, word [esp + 0x12]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x34], esi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x2c]
cmp edi, esi
jae 0x59de21
mov dword [esp + 0x24], ebp
mov esi, dword [esp + 0x38]
lea ebp, [esi + edi*8]
mov word [ebp], ax
lea ebp, [esi + edi*8 + 2]
mov word [ebp], cx
lea ebp, [esi + edi*8 + 4]
mov word [ebp], dx
lea edx, [esi + edi*8 + 6]
mov word [edx], bx
mov edx, dword [esp + 0x24]
test edx, edx
jne 0x59dcbe
mov eax, esi
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x58]
jmp 0x59dba8
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x59dcd9
mov eax, dword [eax + 4]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], eax
lea eax, [0x6f8b2d]
mov dword [esp], eax
mov dword [esp + 4], 0x18
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 1
call fcn.004cde70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
add esp, 0x54
ret
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp], edx
call fcn.00409720
mov eax, dword [esp + 4]
lea ecx, [0x69b600]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call fcn.00409720
mov eax, dword [esp + 4]
lea ecx, [0x69b600]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], eax
lea eax, [0x7045a4]
mov dword [esp], eax
mov dword [esp + 4], 0x36
lea eax, [esp + 0x44]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], 2
call fcn.004cde70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
add esp, 0x54
ret
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov eax, dword [esp + 0x28]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
add esp, 0x54
ret
mov eax, edi
mov ecx, esi
call fcn.00465e00
mov eax, edx
mov ecx, ebx
call fcn.00465e60
mov eax, 3
mov ecx, edx
call fcn.00465e00
mov eax, edi
mov ecx, edx
call fcn.00465e60
nop
call fcn.004649b0
jmp fcn.0059d9e0