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

Disassembly:
push 0xffffffffffffffff
push 0x507c38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
push edi
xor ebp, ebp
mov edi, ecx
cmp esi, ebp
mov dword [esp + 0x18], edi
je 0x40d88f
fld dword [esp + 0x58]
fcomp dword [esp + 0x50]
fnstsw ax
test ah, 0x40
jne 0x40d88f
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x64]
push ecx
push edx
push eax
mov ecx, edi
call fcn.0040cea0
test eax, eax
je 0x40d66d
lea ecx, [esp + 0x6c]
lea edx, [esp + 0x68]
push ecx
lea eax, [esp + 0x68]
push edx
lea ecx, [esp + 0x68]
push eax
push ecx
mov ecx, edi
call fcn.0040cf60
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
push edx
mov edx, dword [esp + 0x74]
push eax
push ecx
push edx
mov ecx, edi
call fcn.0040cea0
test eax, eax
je 0x40d6a7
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x78]
push eax
lea edx, [esp + 0x78]
push ecx
lea eax, [esp + 0x78]
push edx
push eax
mov ecx, edi
call fcn.0040cf60
push 0x57ce60
lea ecx, [esp + 0x20]
call fcn.004e0aab
mov ebx, dword [esp + 0x48]
push 0xffffffffffffffff
push ebp
mov ecx, ebx
mov dword [esp + 0x40], ebp
call fcn.004db7f2
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
push ecx
mov ecx, dword [esp + 0x54]
push edx
push eax
push ecx
push ebx
mov ecx, esi
call fcn.00417e30
mov eax, dword [ebx + 8]
test eax, eax
jle 0x40d87e
mov edx, dword [ebx + 4]
mov esi, dword [edx + ebp*4]
test esi, esi
je 0x40d872
fld dword [esp + 0x50]
fcomp dword [esi + 0x18]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
fnstsw ax
test ah, 0x41
jne 0x40d725
fld dword [esp + 0x50]
fsub dword [esi + 0x18]
fstp dword [esp + 0x10]
fld dword [esp + 0x58]
fcomp dword [esi + 0x1c]
fnstsw ax
test ah, 1
je 0x40d73e
fld dword [esi + 0x1c]
fsub dword [esp + 0x58]
fstp dword [esp + 0x14]
fld dword [esp + 0x70]
fcomp dword [esp + 0x78]
xor edi, edi
fnstsw ax
test ah, 0x40
je 0x40d75e
fld dword [esp + 0x74]
fcomp dword [esp + 0x7c]
fnstsw ax
test ah, 0x40
jne 0x40d77b
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x74]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00417070
mov edi, eax
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x64]
push edx
push eax
push ecx
mov ecx, esi
call fcn.00417070
test edi, edi
je 0x40d7ad
test eax, eax
je 0x40d7ad
mov eax, dword [esp + 0x80]
test eax, eax
jne 0x40d872
fld dword [esp + 0x10]
fadd dword [esi + 0x18]
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
mov dword [esp + 0x48], edx
lea ecx, [esp + 0x48]
push 1
lea edx, [esp + 0x58]
fstp dword [esp + 0x58]
fld dword [esi + 0x1c]
fsub dword [esp + 0x18]
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x58], eax
fstp dword [esp + 0x68]
call fcn.00416560
lea eax, [esp + 0x4c]
push 0
lea ecx, [esp + 0x60]
push eax
push ecx
mov ecx, esi
call fcn.00416560
fld dword [esp + 0x54]
fcomp dword [esp + 0x5c]
fnstsw ax
test ah, 1
je 0x40d872
fld dword [esp + 0x48]
fcomp dword [esp + 0x4c]
fnstsw ax
test ah, 0x41
jne 0x40d872
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x60]
push eax
mov eax, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push eax
push ecx
mov ecx, esi
call fcn.0040cc10
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x28]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x3c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x40]
mov dword [eax + 8], ecx
mov ecx, esi
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x54]
push eax
call fcn.0040d910
mov eax, dword [ebx + 8]
inc ebp
cmp ebp, eax
jl 0x40d6ee
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.004e0a3d
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2c
ret 0x48