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

Disassembly:
sub esp, 0x54
push ebp
push edi
mov edi, dword [esp + 0x70]
mov ebp, ecx
cmp edi, dword [ebp + 0x18]
mov dword [esp + 0x18], ebp
jne 0x1005111c
fld qword [esp + 0x60]
fcomp qword [0x2f40838]
fnstsw ax
test ah, 0x41
jne 0x1005111c
fld qword [esp + 0x60]
fcomp qword [0x2f40830]
fnstsw ax
test ah, 5
jp 0x1005111c
fld qword [esp + 0x68]
fcomp qword [0x2f40120]
fnstsw ax
test ah, 0x41
jne 0x1005111c
fld qword [esp + 0x68]
fcomp qword [0x2f40118]
fnstsw ax
test ah, 5
jnp 0x10051310
push ebx
mov ecx, 0x2f40820
mov eax, 0x12c
push esi
xor esi, esi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x2c], ecx
push ebp
lea ecx, [esp + 0x4c]
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
call fcn.1004fa60
push edi
push esi
lea ecx, [esp + 0x34]
call fcn.100502d0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.1004f5a0
mov ebx, dword [esp + 0x44]
add ebx, 0xffffffff
cmp ebx, esi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x18], ebx
jl 0x10051273
fld qword [0x2f3f070]
mov edx, dword [esp + 0x34]
fdiv qword [esp + 0x68]
lea edi, [ebx*8]
sub edi, ebx
add edi, edi
add edi, edi
mov dword [esp + 0x14], 0xffffffe4
lea ebp, [edi + edx]
fstp qword [esp + 0x24]
nop
fild dword [esp + 0x18]
fnstcw word [esp + 0x68]
movzx eax, word [esp + 0x68]
fsub qword [esp + 0x70]
or ah, 0xc
fmul qword [esp + 0x24]
fadd qword [0x2f3f090]
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov esi, dword [esp + 0x18]
test esi, esi
fldcw word [esp + 0x68]
jl 0x10051248
cmp esi, dword [esp + 0x60]
jge 0x10051248
cmp esi, dword [esp + 0x10]
jne 0x10051226
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
add eax, ecx
push eax
mov ecx, ebp
call fcn.10012db0
jmp 0x10051254
mov eax, dword [esp + 0x50]
lea edx, [esi*8]
sub edx, esi
lea ecx, [eax + edx*4]
push ecx
mov ecx, ebp
call fcn.1004f4d0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
jmp 0x10051254
mov edx, dword [esp + 0x5c]
push edx
mov ecx, ebp
call fcn.100461d0
sub ebx, 1
sub edi, 0x1c
sub ebp, 0x1c
test ebx, ebx
mov dword [esp + 0x18], ebx
jge 0x100511d0
mov edi, dword [esp + 0x78]
mov ebp, dword [esp + 0x20]
xor esi, esi
mov ebx, dword [esp + 0x5c]
cmp ebx, 0xf4240
jle 0x10051293
mov eax, dword [0x2f442a0]
push 0xffffe3d7
push eax
push esi
call fcn.10017400
add esp, 0xc
cmp edi, 0xf4240
jle 0x100512b0
mov ecx, dword [0x2f442a0]
push 0xffffe3d8
push ecx
push esi
call fcn.10017400
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
mov ecx, ebp
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edi
call fcn.1004fa60
mov ecx, dword [esp + 0x34]
cmp ecx, esi
je 0x100512e5
cmp dword [ecx - 4], esi
lea eax, [ecx - 4]
je 0x100512dc
mov eax, dword [ecx]
push 3
call dword [eax]
jmp 0x100512e5
push eax
call fcn.10018560
add esp, 4
mov ecx, dword [esp + 0x50]
cmp ecx, esi
je 0x1005130e
cmp dword [ecx - 4], esi
lea eax, [ecx - 4]
je 0x10051305
mov edx, dword [ecx]
push 3
call dword [edx]
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x54
ret 0x18
push eax
call fcn.10018560
add esp, 4
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x54
ret 0x18