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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
mov eax, dword [0x584ff0]
push ebx
push ebp
push esi
test eax, eax
push edi
jne 0x40c169
call fcn.00404c70
mov ecx, eax
mov eax, dword [0x583ae8]
mov dword [0x578228], ecx
fld qword [eax + 0xdc]
fcomp qword [0x550f20]
fnstsw ax
test ah, 0x40
je 0x40c169
mov eax, dword [0x5835a0]
mov ebx, 1
cmp eax, ebx
je 0x40c169
mov eax, dword [ecx]
test ah, 4
jne 0x40c169
mov eax, dword [0x583594]
mov edx, dword [ecx + 0x2c]
mov ebp, dword [ecx + 0x24]
lea eax, [eax + eax*4]
sub edx, ebp
shl eax, 1
cmp edx, eax
jl 0x40c169
mov edx, dword [ecx + 0x30]
mov edi, dword [ecx + 0x28]
mov eax, dword [0x583590]
sub edx, edi
shl eax, 2
cmp edx, eax
jl 0x40c169
push ecx
call fcn.004b16e0
mov ecx, dword [0x56c660]
push ecx
call fcn.004b2890
mov edx, dword [0x583ae8]
mov ecx, dword [0x5835a0]
add esp, 8
mov ebp, dword [edx]
and ebp, 0xff
cmp ecx, 3
mov dword [esp + 0x1c], ebp
jne 0x40be0e
mov eax, dword [0x584ce8]
test eax, eax
je 0x40be0e
test byte [eax + 0xcc], bl
je 0x40be0e
fld qword [eax + 0xf0]
fcomp qword [0x550f20]
fnstsw ax
test ah, 0x40
jne 0x40be0e
mov dword [esp + 0x18], ebx
jmp 0x40be20
cmp ecx, 3
mov dword [esp + 0x18], 0
jne 0x40be20
call fcn.0049f1e0
mov dword [esp + 0x14], ebx
cmp ebp, 1
je 0x40bf05
cmp ebp, 2
je 0x40bf05
cmp ebp, 4
jne 0x40be86
mov edi, 3
mov esi, 1
mov eax, dword [0x578228]
mov ecx, dword [eax + 0xec]
mov edx, dword [eax + 0xf0]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0xf4]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0xf8]
cmp esi, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
jne 0x40bf14
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0x60]
jmp 0x40bf2d
cmp ebp, 5
jne 0x40bebe
mov eax, dword [0x578228]
mov edi, 2
mov esi, 1
mov ecx, dword [eax + 0x64]
mov edx, dword [eax + 0x68]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0x74]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0x78]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 0x5c]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 0x60]
jmp 0x40bf2d
mov eax, dword [0x583ae8]
mov edi, 1
fld qword [eax + 0xe4]
fcomp qword [0x550f20]
fnstsw ax
test ah, 0x40
jne 0x40befe
mov esi, 3
mov eax, dword [0x578228]
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0x60]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0x6c]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0x70]
jmp 0x40be6a
mov esi, 2
jmp 0x40bee0
mov edi, 3
mov esi, 2
jmp 0x40be45
cmp esi, 2
jne 0x40bf21
mov ecx, dword [eax + 0x64]
mov edx, dword [eax + 0x68]
jmp 0x40bf2d
mov ecx, dword [eax + 0xec]
mov edx, dword [eax + 0xf0]
push ebx
push esi
mov eax, edx
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x34]
push edi
push eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x40], ecx
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x38]
push eax
push ecx
push edx
call fcn.0040c180
add esp, 0x24
cmp esi, 1
jne 0x40bf78
mov eax, dword [0x578228]
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0x60]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0x6c]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0x70]
jmp 0x40bfb8
mov eax, dword [0x578228]
cmp esi, 2
jne 0x40bf98
mov ecx, dword [eax + 0x64]
mov edx, dword [eax + 0x68]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0x74]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0x78]
jmp 0x40bfb8
mov ecx, dword [eax + 0xec]
mov edx, dword [eax + 0xf0]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0xf4]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0xf8]
cmp edi, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
jne 0x40bfcd
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0x60]
jmp 0x40bff9
cmp edi, 2
jne 0x40bfda
mov ecx, dword [eax + 0x64]
mov edx, dword [eax + 0x68]
jmp 0x40bff9
cmp ebp, 1
jne 0x40bfed
mov ecx, dword [eax + 0xf4]
mov edx, dword [eax + 0xf8]
jmp 0x40bff9
mov ecx, dword [eax + 0xec]
mov edx, dword [eax + 0xf0]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x30], ecx
test eax, eax
mov dword [esp + 0x34], edx
jne 0x40c06a
cmp dword [0x571920], 0x54
jne 0x40c035
cmp dword [0x5835a0], 3
jne 0x40c035
mov eax, dword [0x584ce8]
test eax, eax
je 0x40c035
mov ecx, dword [eax + 0xc0]
test ecx, ecx
jge 0x40c035
mov eax, 1
jmp 0x40c037
xor eax, eax
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push 0
push ebx
push 0
push eax
mov eax, dword [esp + 0x44]
push edi
push esi
push eax
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x44]
push eax
push ecx
push edx
call fcn.0040c7b0
add esp, 0x30
jmp 0x40c12d
mov eax, dword [0x584ce8]
fld qword [eax + 0xf0]
fmul qword [0x550f08]
fld qword [esp + 0x20]
fdiv st(1)
fstp qword [esp + 0x20]
fdivr qword [esp + 0x28]
fst qword [esp + 0x28]
fld qword [esp + 0x20]
fcomp qword [0x550f20]
fnstsw ax
test ah, 1
je 0x40c0ae
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
fcomp qword [0x550f28]
fnstsw ax
test ah, 0x41
jne 0x40c0cb
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0x40768000
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
push 1
mov eax, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x30]
push 0
push 0
push edi
push esi
push ecx
mov ecx, dword [esp + 0x3c]
push edx
push ebp
push ebx
push eax
push ecx
call fcn.0040c7b0
mov edx, dword [esp + 0x44]
mov eax, dword [0x578228]
push 2
push edx
mov ecx, dword [eax + 0x70]
mov edx, dword [eax + 0x6c]
mov eax, dword [esp + 0x5c]
push 1
push 0
push edi
push esi
push ecx
mov ecx, dword [esp + 0x6c]
push edx
push ebp
push ebx
push eax
push ecx
call fcn.0040c7b0
mov ebx, dword [esp + 0x74]
mov ebp, dword [esp + 0x7c]
add esp, 0x60
dec ebx
mov dword [esp + 0x14], ebx
jns 0x40be24
cmp dword [0x571920], 0x54
jne 0x40c158
mov eax, dword [0x584fd8]
test eax, eax
je 0x40c158
cmp dword [0x5835a0], 2
jne 0x40c158
call fcn.00438390
push 0
call fcn.004b2c10
push 1
call fcn.004b2c50
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret