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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x40]
push 1
mov esi, ecx
push edi
call fcn.00494610
fstp qword [esp + 0x28]
xor ebx, ebx
mov ecx, esi
xor ebp, ebp
mov dword [esp + 0x1c], ebx
call fcn.0048e370
mov edx, dword [edi + 0x174]
mov esi, eax
mov eax, 3
sub esi, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], eax
lea eax, [edi + 0x5c]
mov dword [esp + 0x24], esi
push eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], 2
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
fld qword [esp + 0x28]
fcom qword [0x5056a8]
fnstsw ax
test ah, 0x41
je 0x495dd4
fstp st(0)
fld qword [edi + 0x128]
call sub.MSVCRT.dll__ftol
mov dword [edi + 0x78], eax
mov ecx, dword [edi + 0x140]
mov dword [edi + 0x74], ecx
lea eax, [edi + 0x3a0]
mov edx, 3
or ecx, 0xffffffff
mov esi, dword [eax - 0x28]
mov dword [eax], esi
mov esi, dword [eax - 0x20]
mov dword [eax + 4], esi
mov esi, dword [eax - 0x18]
mov dword [eax + 8], esi
mov dword [eax - 8], ecx
mov dword [eax - 0xc], ecx
mov dword [eax - 4], ecx
add eax, 0x44
dec edx
jne 0x495da1
mov edx, dword [edi + 0x54]
lea ecx, [edi + 0x54]
call dword [edx + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4
lea eax, [edi + 0x378]
mov ecx, 3
cmp dword [eax - 0x10], ebp
je 0x495de6
add ebx, dword [eax]
add eax, 0x44
dec ecx
jne 0x495ddf
cmp ebx, ebp
mov dword [esp + 0x1c], ebx
jl 0x495e15
fild dword [esp + 0x1c]
fdiv st(1)
fmul qword [0x507a10]
call sub.MSVCRT.dll__ftol
neg esi
sub esi, eax
jns 0x495e0d
xor esi, esi
mov dword [edi + 0x444], esi
jmp 0x495e1b
mov dword [edi + 0x444], ebp
fild dword [esp + 0x24]
mov dword [esp + 0x1c], 2
fmul st(1)
fmul qword [0x505090]
fld st(0)
lea eax, [esp + 0x30]
mov esi, 2
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov ebp, edx
mov ebx, ecx
shl ebp, 4
shl ebx, 4
add ebp, edx
add ebx, ecx
mov ebp, dword [edi + ebp*4 + 0x378]
cmp ebp, dword [edi + ebx*4 + 0x378]
jle 0x495e62
mov dword [eax + 4], edx
mov dword [eax], ecx
add eax, 4
dec esi
jne 0x495e3a
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jne 0x495e31
lea eax, [esp + 0x30]
mov dword [esp + 0x24], 3
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
fild dword [esp + 0x10]
mov eax, dword [ecx]
mov edx, eax
shl edx, 4
add edx, eax
xor eax, eax
fdivr st(1)
mov ebx, dword [edi + edx*4 + 0x368]
lea esi, [edi + edx*4 + 0x368]
cmp ebx, eax
je 0x495f26
mov ebp, dword [esi + 0x10]
mov dword [esp + 0x20], ebp
fild dword [esp + 0x20]
fcom st(1)
fxch st(2)
fnstsw ax
test ah, 1
je 0x495ed9
xor eax, eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x38], eax
mov eax, dword [esp + 0x40]
fsub st(2)
fxch st(2)
fstp st(0)
dec eax
mov dword [esp + 0x40], eax
jmp 0x495f03
fsub st(1)
fxch st(2)
fsub st(1)
fild dword [esp + 0x40]
fmul st(1)
fdiv st(5)
fmul qword [0x5056a0]
call sub.MSVCRT.dll__ftol
fadd qword [0x507a08]
mov dword [esi + 0x2c], eax
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x38], eax
mov ecx, dword [ebx + 0x44]
mov eax, ebp
mov ebp, dword [esi + 0x38]
mov edx, dword [esp + 0x18]
sub eax, ebp
imul ecx, eax
add edx, ecx
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0x10]
imul edx, eax
add dword [esp + 0x14], edx
jmp 0x495f30
mov dword [esi + 0x2c], eax
mov dword [esi + 0x38], eax
dec dword [esp + 0x40]
mov ebp, dword [esi + 4]
xor ebx, ebx
test ebp, ebp
je 0x495fcd
mov eax, dword [esi + 0x2c]
test eax, eax
jle 0x495f48
fld st(0)
jmp 0x495f4b
fild dword [esi + 0x10]
mov eax, dword [esi + 0x18]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fst qword [esp + 0x28]
fsub st(1)
fimul dword [esp + 0x40]
fdiv st(5)
fmul qword [0x5056a0]
call sub.MSVCRT.dll__ftol
mov ebx, eax
test ebx, ebx
fstp st(0)
jge 0x495f7b
fstp st(0)
xor ebx, ebx
jmp 0x495fa1
mov eax, dword [esi + 0x2c]
test eax, eax
jg 0x495f87
fstp st(0)
fild dword [esi + 0x10]
fld qword [esp + 0x28]
fsub st(1)
fadd qword [0x507a08]
call sub.MSVCRT.dll__ftol
test eax, eax
fstp st(0)
mov dword [esi + 0x3c], eax
jge 0x495fa8
mov dword [esi + 0x3c], 0
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x3c]
sub eax, ecx
mov ecx, dword [ebp + 0x44]
imul ecx, eax
mov edx, dword [esp + 0x18]
add edx, ecx
mov dword [esp + 0x18], edx
mov edx, dword [ebp + 0x10]
imul edx, eax
add dword [esp + 0x14], edx
jmp 0x495fd6
fstp st(0)
mov dword [esi + 0x3c], 0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
dec edx
add ecx, 4
dec eax
mov dword [esi + 0x30], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
jne 0x495e83
mov eax, 3
mov dword [esp + 0x30], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], eax
mov eax, 2
mov dword [esp + 0x34], 1
fstp st(0)
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x30]
mov esi, 2
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov ebp, edx
mov ebx, ecx
shl ebp, 4
shl ebx, 4
add ebp, edx
add ebx, ecx
mov ebp, dword [edi + ebp*4 + 0x388]
cmp ebp, dword [edi + ebx*4 + 0x388]
jle 0x496059
mov dword [eax + 4], edx
mov dword [eax], ecx
add eax, 4
dec esi
jne 0x496031
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
jne 0x496028
lea eax, [esp + 0x30]
mov dword [esp + 0x24], 3
mov dword [esp + 0x1c], eax
xor ecx, ecx
fild dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
fdivr st(1)
mov eax, dword [edx]
mov edx, eax
shl edx, 4
add edx, eax
mov ebx, dword [edi + edx*4 + 0x370]
lea esi, [edi + edx*4 + 0x368]
cmp ebx, ecx
fstp qword [esp + 0x28]
je 0x496133
mov ebp, dword [esi + 0x20]
mov dword [esp + 0x20], ebp
fild dword [esp + 0x20]
fcom qword [esp + 0x28]
fxch st(1)
fnstsw ax
test ah, 1
je 0x4960da
xor eax, eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x40], eax
mov eax, dword [esp + 0x40]
fsub st(1)
fxch st(1)
fstp st(0)
dec eax
mov dword [esp + 0x40], eax
jmp 0x496108
fsub qword [esp + 0x28]
fxch st(1)
fsub qword [esp + 0x28]
fild dword [esp + 0x40]
fmul st(1)
fdiv st(3)
fmul qword [0x5056a0]
call sub.MSVCRT.dll__ftol
fadd qword [0x507a08]
mov dword [esi + 0x34], eax
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x40], eax
mov ecx, dword [ebx + 0x44]
mov eax, ebp
mov ebp, dword [esi + 0x40]
mov edx, dword [esp + 0x18]
sub eax, ebp
imul ecx, eax
add edx, ecx
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0x10]
imul edx, eax
mov eax, dword [esp + 0x14]
add eax, edx
xor ecx, ecx
mov dword [esp + 0x14], eax
jmp 0x496142
mov eax, dword [esp + 0x40]
mov dword [esi + 0x34], ecx
dec eax
mov dword [esi + 0x40], ecx
mov dword [esp + 0x40], eax
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
dec esi
add edx, 4
dec eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], eax
jne 0x49607c
fstp st(0)
fstp st(0)
fild dword [edi + 0x1dc]
fmul qword [0x504b30]
fadd qword [0x504b28]
fild dword [esp + 0x14]
fmul st(1)
call sub.MSVCRT.dll__ftol
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fadd qword [edi + 0x128]
call sub.MSVCRT.dll__ftol
fild dword [esp + 0x18]
mov dword [edi + 0x78], eax
fmul st(1)
call sub.MSVCRT.dll__ftol
mov ecx, dword [edi + 0x140]
add eax, ecx
lea ecx, [edi + 0x54]
mov dword [edi + 0x74], eax
mov eax, dword [ecx]
fstp st(0)
call dword [eax + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4