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

Disassembly:
mov ecx, dword [0x5915c4]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0x10]
cmp eax, dword [ecx + 8]
jbe 0x495b42
sub esp, 0x90
mov dword [0x551fc4], 5
mov eax, dword [0x591668]
test eax, eax
je 0x49573f
mov eax, dword [0x551fc0]
call fcn.0046d770
mov dword [edi], eax
lea eax, [0x4c9277]
mov dword [0x551fc0], eax
mov eax, dword [esp + 0x94]
movzx ecx, word [eax + 0x46]
test cx, cx
jbe 0x495762
mov ecx, 2
jmp 0x495767
mov ecx, 1
mov dword [esp + 0x3c], ecx
lea eax, [0x4be4e0]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.004534f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x3c]
mov dword [0x551fcc], ecx
mov dword [0x551fd0], ecx
mov edx, dword [0x591668]
test edx, edx
je 0x4957af
call fcn.0046d780
mov dword [edi], eax
mov edx, dword [0x551fc8]
mov dword [edi + 4], edx
mov dword [0x551fc8], eax
mov eax, dword [esp + 0x94]
mov dword [esp], eax
call fcn.00495410
mov eax, dword [esp + 8]
mov ecx, dword [0x551fc8]
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov eax, dword [0x591668]
test eax, eax
je 0x4957f3
call fcn.0046d780
mov dword [edi], edx
mov eax, dword [ecx]
mov dword [edi + 4], eax
mov dword [ecx], edx
mov eax, dword [esp + 0x3c]
cmp eax, 1
je 0x49595a
mov eax, dword [esp + 0x94]
mov edx, dword [eax + 0x54]
add edx, dword [eax]
neg edx
imul edx, edx, 0x3c
mov dword [ecx + 8], edx
mov ecx, dword [0x551fc8]
mov dword [ecx + 0x14], ebp
mov edx, dword [0x591668]
test edx, edx
je 0x495836
call fcn.0046d780
mov dword [edi], ebx
mov edx, dword [ecx + 0x10]
mov dword [edi + 4], edx
mov dword [ecx + 0x10], ebx
mov edx, dword [eax + 0xa8]
add edx, dword [eax]
neg edx
imul edx, edx, 0x3c
mov dword [ecx + 0x18], edx
mov byte [ecx + 0x1c], 1
movzx ecx, word [eax + 0x46]
mov word [esp + 0x2e], cx
movzx edx, word [eax + 0x9a]
mov word [esp + 0x2c], dx
lea ebx, [eax + 0x44]
add eax, 0x98
cmp dx, cx
jb 0x495875
mov ebp, eax
mov eax, ebx
mov ebx, ebp
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], eax
lea ecx, [0x4bf360]
mov dword [esp], ecx
mov dword [esp + 4], 0x190
mov dword [esp + 8], 0x190
call fcn.004534f0
mov eax, dword [esp + 0xc]
mov dword [0x551fd8], 0x190
mov dword [0x551fdc], 0x190
mov ecx, dword [0x591668]
test ecx, ecx
je 0x4958cd
call fcn.0046d780
mov dword [edi], eax
mov ecx, dword [0x551fd4]
mov dword [edi + 4], ecx
mov dword [0x551fd4], eax
call fcn.00492d50
movzx eax, word [esp + 0x2c]
movzx ecx, word [esp + 0x2e]
cmp ax, cx
setb al
mov byte [esp + 0x2b], al
setae cl
mov byte [esp + 0x2a], cl
lea edi, [esp + 0x7c]
lea esi, [esp]
call fcn.0046dd4e
lea edi, [esp]
lea esi, [esp + 0x7c]
call fcn.0046dd4e
call fcn.00492eb0
lea edi, [esp + 0x58]
lea esi, [esp + 0x14]
call fcn.0046dd4e
lea edi, [esp]
lea esi, [esp + 0x58]
call fcn.0046dd4e
call fcn.00492410
mov eax, dword [esp + 0x14]
mov dword [esp + 0x30], eax
lea ecx, [eax - 0x64]
movzx edx, byte [esp + 0x2a]
movzx ebx, dl
mov dword [esp + 0x40], ebx
movzx ebp, byte [esp + 0x2b]
xchg ebp, eax
movzx esi, al
xchg ebp, eax
mov dword [esp + 0x44], esi
xor edi, edi
jmp 0x495b30
mov eax, dword [esp + 0x94]
mov eax, dword [eax]
neg eax
imul eax, eax, 0x3c
mov dword [ecx + 8], eax
mov dword [0x551fe8], 0
mov dword [0x551fec], 0x80000000
mov dword [0x551ff0], 0xffffffff
mov dword [0x551ff4], 0x7fffffff
mov eax, dword [0x591668]
test eax, eax
je 0x4959ad
call fcn.0046d780
mov dword [edi], ecx
mov eax, dword [0x551ff8]
mov dword [edi + 4], eax
mov dword [0x551ff8], ecx
lea eax, [0x4bf360]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.004534f0
mov eax, dword [esp + 0xc]
mov dword [0x551fd8], 1
mov dword [0x551fdc], 1
mov ecx, dword [0x591668]
test ecx, ecx
je 0x495a03
call fcn.0046d780
mov dword [edi], eax
mov ecx, dword [0x551fd4]
mov dword [edi + 4], ecx
mov dword [0x551fd4], eax
mov eax, dword [0x551fd4]
mov ecx, dword [0x551fe8]
mov edx, dword [0x551fec]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [0x551fd4]
mov byte [eax + 8], 0
add esp, 0x90
ret
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edi
mov eax, dword [0x551fd4]
mov dword [esp + 0x78], eax
mov dword [esp], ecx
mov edx, dword [esp + 0x70]
mov dword [esp + 4], edx
call fcn.004955c0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x54], ecx
mov edx, dword [esp + 0x40]
shl edx, 4
add edx, dword [0x551fc8]
mov edx, dword [edx + 8]
mov ebp, edx
sar edx, 0x1f
mov esi, dword [esp + 0x38]
lea edi, [esi + esi*2]
mov dword [esp + 0x50], edi
mov ebx, dword [esp + 0x78]
lea ecx, [ebx + edi*4 + 8]
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0x44]
shl ecx, 4
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x34]
inc ecx
mov dword [esp + 0x48], ecx
add esi, 2
mov dword [esp + 0x38], esi
sub eax, ebp
mov dword [ebx + edi*4], eax
mov eax, dword [esp + 0x54]
sbb eax, edx
mov dword [ebx + edi*4 + 4], eax
movzx eax, byte [esp + 0x2b]
mov edx, dword [esp + 0x74]
mov byte [edx], al
mov edx, dword [0x551fd4]
mov dword [esp + 0x78], edx
mov ebx, dword [esp + 0x34]
mov dword [esp], ebx
mov ebx, dword [esp + 0x6c]
mov dword [esp + 4], ebx
call fcn.004955c0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x4c]
add edx, dword [0x551fc8]
mov edx, dword [edx + 8]
mov ebx, edx
sar edx, 0x1f
mov ebp, dword [esp + 0x50]
mov esi, dword [esp + 0x78]
lea edi, [esi + ebp*4 + 0x14]
sub eax, ebx
mov dword [esi + ebp*4 + 0xc], eax
sbb ecx, edx
mov dword [esi + ebp*4 + 0x10], ecx
movzx edx, byte [esp + 0x2a]
mov byte [edi], dl
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x40]
movzx ebp, byte [esp + 0x2b]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x38]
add eax, 0x64
cmp ecx, eax
jl 0x495a31
add esp, 0x90
ret
call fcn.0046c370
jmp fcn.00495700