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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xb0
fld xword [ebp + 8]
fld st(0)
fstp xword [esp + 0xa0]
fld xword [ebp + 0x14]
fld st(0)
fstp xword [esp + 0x90]
movzx ebx, word [esp + 0xa8]
movzx ecx, word [esp + 0x98]
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x14], ebx
mov eax, ecx
and ebx, 0x7fff
mov esi, dword [esp + 0x90]
mov edi, dword [esp + 0xa4]
and eax, 0x7fff
cmp ebx, 0x7fff
mov dword [esp + 8], esi
mov esi, dword [esp + 0x94]
mov dword [esp + 4], esi
jne 0x40d3fd
mov ecx, edi
mov esi, edx
fstp st(0)
mov dword [esp + 0xc], eax
xor ecx, 0x80000000
or esi, ecx
jne 0x40d44d
mov ecx, dword [esp + 4]
mov eax, 0x80000000
movzx edx, word [esp + 0xc]
xor ecx, eax
or dword [esp + 8], ecx
fld dword [0x4164c0]
fld st(1)
fcmove st(0), st(1)
fstp st(1)
cmp edx, 0x7fff
fxch st(1)
fcmove st(0), st(1)
fstp st(1)
jmp 0x40dbb8
mov dword [esp + 0x1c], edi
movzx edi, ax
mov dword [esp + 0x18], ecx
cmp edi, 0x7fff
jne 0x40d46f
fstp st(1)
mov esi, dword [esp + 4]
mov edi, dword [esp + 8]
mov eax, esi
mov edx, edi
xor eax, 0x80000000
or edx, eax
je 0x40dbb8
or esi, 0xc0000000
fstp st(0)
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], esi
mov eax, dword [esp + 0x18]
mov word [esp + 0x58], ax
fld xword [esp + 0x50]
jmp 0x40dbb8
or edi, 0xc0000000
fstp st(0)
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edi
mov eax, dword [esp + 0x14]
mov word [esp + 0x48], ax
fld xword [esp + 0x40]
jmp 0x40dbb8
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
mov esi, edx
movzx edx, bx
mov ecx, edx
mov dword [esp + 0x10], esi
or edx, esi
mov esi, edi
or esi, eax
or edx, dword [esp + 0x1c]
je 0x40d4da
fstp st(0)
mov edx, eax
mov eax, dword [esp + 4]
or esi, eax
je 0x40dbb8
fstp st(0)
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x10], edx
mov edx, esi
sbb edx, eax
mov edx, eax
mov eax, 0
sbb ecx, edi
sbb eax, eax
jae 0x40d50e
mov eax, ebx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 8]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x18]
mov word [esp + 0x28], bx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edx
jmp 0x40d53d
fstp st(1)
or esi, dword [esp + 4]
jne 0x40dbb8
fstp st(0)
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
and ecx, dword [esp + 0x14]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x1c]
mov word [esp + 0x68], cx
mov dword [esp + 0x64], eax
fld xword [esp + 0x60]
jmp 0x40dbb8
mov eax, dword [esp + 0xc]
mov word [esp + 0x28], ax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
mov dword [esp + 0x24], esi
mov dword [esp + 0xc], ebx
mov esi, edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov edi, ecx
bsr eax, ecx
mov dword [esp + 0x10], ecx
mov ecx, 0x3f
cmove eax, ecx
bsr ebx, esi
mov edx, edi
xor eax, 0x1f
xor ebx, 0x1f
add eax, 0x20
test esi, esi
cmove ebx, eax
mov eax, esi
mov ecx, ebx
mov dword [esp + 0x34], ebx
shld eax, edi, cl
shl edx, cl
test bl, 0x20
mov ecx, 0
mov edi, 0
cmovne eax, edx
cmovne edx, ecx
mov ecx, ebx
sub cl, 0x40
cmovae edx, edi
mov edi, dword [esp + 0x10]
neg cl
mov dword [esp + 4], edx
mov edx, edi
shrd edx, esi, cl
shr esi, cl
test cl, 0x20
mov ecx, ebx
cmove esi, edx
add cl, 0xc0
mov edx, 0x3f
shl edi, cl
test cl, 0x20
mov ecx, 0
cmovne edi, ecx
cmp bl, 0x40
cmovae eax, ecx
cmovb edi, esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x24]
bsr ecx, eax
mov ebx, edi
mov esi, eax
cmove ecx, edx
bsr edx, edi
xor ecx, 0x1f
xor edx, 0x1f
add ecx, 0x20
test edi, edi
cmove edx, ecx
mov ecx, edx
shld ebx, eax, cl
shl esi, cl
test dl, 0x20
mov ecx, 0
cmovne ebx, esi
cmovne esi, ecx
mov ecx, edx
mov dword [esp + 8], ebx
sub cl, 0x40
mov ebx, 0
cmovae esi, ebx
neg cl
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x18], esi
mov esi, eax
shrd esi, edi, cl
shr edi, cl
test cl, 0x20
mov ecx, edx
cmove edi, esi
mov esi, dword [esp + 8]
add cl, 0xc0
shl eax, cl
test cl, 0x20
mov ecx, 0
cmovne eax, ecx
cmp dl, 0x40
cmovb eax, edi
mov edi, dword [esp + 0x14]
cmovae esi, ecx
movzx ecx, word [esp + 0xc]
test edx, edx
cmove eax, edx
mov dword [esp + 8], esi
sub ecx, edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x24], ecx
movzx ecx, word [esp + 0x28]
test edx, edx
cmove ebx, edx
shld eax, esi, 3
mov esi, dword [esp + 0x1c]
sub edx, ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
mov eax, ebx
shld eax, esi, 3
xor edi, ecx
movzx eax, ax
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 4]
shld esi, eax, 3
shl eax, 3
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], esi
mov esi, eax
add edx, eax
mov eax, ecx
je 0x40d83f
cmp edx, 0x4f
ja 0x40d849
mov esi, dword [esp + 0xc]
mov ebx, edx
sub dl, 0x40
xor edi, edi
neg dl
mov dword [esp + 0x34], ebx
mov ecx, edx
mov eax, esi
shld edi, esi, cl
shl eax, cl
test dl, 0x20
mov ecx, ebx
mov dword [esp + 0x10], eax
cmovne edi, eax
mov eax, esi
xor esi, esi
shrd eax, esi, cl
mov esi, dword [esp + 0x1c]
shr esi, cl
test bl, 0x20
mov ecx, 0
cmovne eax, ecx
mov dword [esp + 0x30], esi
mov ecx, esi
mov esi, 0
cmovne ecx, esi
or ecx, edi
cmp bl, 0x40
mov edi, 0
cmovae eax, edi
mov edi, 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
cmovae ecx, edi
xor edi, edi
test dl, 0x20
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x3c], ecx
mov ecx, ebx
mov ch, 0x50
cmovne eax, edi
mov edi, dword [esp + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
shrd edi, edx, cl
test bl, 0x20
mov cl, bl
cmovne edi, dword [esp + 0x30]
add cl, 0xc0
mov edx, eax
xor esi, esi
shrd edx, esi, cl
xor esi, esi
test cl, 0x20
cmovne edx, esi
mov esi, dword [esp + 0x1c]
or edi, dword [esp + 0x10]
cmp bl, 0x40
cmovae edi, edx
sub ch, bl
mov ebx, esi
mov cl, ch
mov dword [esp + 0x38], edi
shl eax, cl
mov cl, ch
mov edx, eax
mov eax, dword [esp + 4]
shld ebx, eax, cl
shl eax, cl
test ch, 0x20
cmovne ebx, eax
mov dword [esp + 0x10], ebx
mov ebx, 0
cmovne edx, ebx
cmovne eax, ebx
and ch, 0x7f
mov edi, dword [esp + 0x10]
mov cl, ch
mov dword [esp + 0x30], edx
mov edx, esi
sub cl, 0x40
cmovae eax, ebx
mov ebx, dword [esp + 4]
neg cl
shr edx, cl
shrd ebx, esi, cl
test cl, 0x20
mov cl, ch
mov esi, 0
cmove edx, ebx
mov ebx, dword [esp + 4]
add cl, 0xc0
or edx, dword [esp + 0x30]
shl ebx, cl
test cl, 0x20
cmovne ebx, esi
cmp ch, 0x40
mov esi, 0
cmovae edi, esi
cmovb ebx, edx
test ch, ch
movzx esi, word [esp + 0x28]
cmove ebx, dword [esp + 0xc]
mov dword [esp + 0x10], edi
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov dword [esp + 0xc], esi
movzx edx, bx
mov ebx, dword [esp + 0x1c]
or edx, eax
mov eax, dword [esp + 0x38]
or edx, dword [esp + 0x10]
setne cl
cmp byte [esp + 0x34], 0
cmove eax, dword [esp + 4]
cmovne ebx, dword [esp + 0x3c]
or eax, ecx
mov ecx, dword [esp + 0x24]
mov edx, eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0x18]
jmp 0x40d863
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
jmp 0x40d85f
mov edx, dword [esp + 0x18]
xor ebx, ebx
mov dword [esp + 4], 1
mov dword [esp + 0xc], 0
mov ecx, esi
mov edi, eax
shld dword [esp + 8], edx, 3
shl edx, 3
movzx eax, word [esp + 0x2c]
cmp word [esp + 0x14], 0
js 0x40d8be
add edx, dword [esp + 4]
adc dword [esp + 8], ebx
mov ebx, dword [esp + 0xc]
adc ebx, eax
test bl, 8
movzx ebx, bx
je 0x40da0d
mov esi, dword [esp + 8]
mov eax, ebx
shr ebx, 1
inc ecx
shld eax, esi, 0x1f
shld esi, edx, 0x1f
and edx, 1
or edx, esi
cmp ecx, 0x7fff
mov dword [esp + 8], eax
jge 0x40d9dd
jmp 0x40da0d
sub edx, dword [esp + 4]
mov esi, dword [esp + 8]
sbb esi, ebx
sbb eax, dword [esp + 0xc]
mov dword [esp + 8], esi
fldz
movzx ebx, ax
mov eax, edx
or eax, ebx
or eax, esi
je 0x40dbb8
mov eax, 3
mov esi, 0
fstp st(0)
cmp eax, ebx
sbb esi, esi
jb 0x40da0d
mov esi, dword [esp + 8]
bsr ecx, edx
mov dword [esp + 0x20], edi
mov edi, ebx
xor ecx, 0x1f
add ecx, 0x20
bsr eax, esi
xor eax, 0x1f
test esi, esi
cmovne ecx, eax
bsr eax, ebx
xor eax, 0x1f
add ecx, 0x40
add eax, 0x20
test ebx, ebx
cmove eax, ecx
add eax, 0xffffffc3
mov ecx, eax
shl edi, cl
mov dword [esp + 0x14], edi
mov edi, esi
mov esi, edx
shld edi, edx, cl
shl esi, cl
mov ecx, dword [esp + 0x14]
test al, 0x20
cmovne edi, esi
mov dword [esp + 4], edi
mov edi, 0
cmovne esi, edi
cmovne ecx, edi
mov dword [esp + 0x14], ecx
mov ch, al
and ch, 0x7f
mov cl, ch
mov byte [esp + 0xc], ch
sub cl, 0x40
cmovae esi, edi
neg cl
mov edi, edx
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 8]
shrd edi, esi, cl
shr esi, cl
test cl, 0x20
mov cl, ch
cmove esi, edi
add cl, 0xc0
mov edi, dword [esp + 0x20]
or esi, dword [esp + 0x14]
shl edx, cl
test cl, 0x20
mov ecx, 0
cmovne edx, ecx
cmp byte [esp + 0xc], 0x40
mov ecx, dword [esp + 4]
mov dword [esp + 0x18], edx
mov edx, 0
cmovae ecx, edx
mov edx, dword [esp + 0x18]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x24]
cmovb edx, esi
cmp byte [esp + 0xc], 0
cmove edx, ebx
sub ecx, eax
mov eax, dword [esp + 4]
movzx ebx, dx
mov edx, dword [esp + 0x1c]
cmp ecx, 0x7fff
mov dword [esp + 8], eax
jl 0x40da0d
or edi, 0x7fff
mov dword [esp + 0x84], 0x80000000
mov dword [esp + 0x80], 0
mov word [esp + 0x88], di
fld xword [esp + 0x80]
jmp 0x40dbb8
and edi, 0x8000
test ecx, ecx
jle 0x40da1e
mov eax, ecx
jmp 0x40db6f
mov ah, 1
mov al, 0x50
mov esi, ebx
mov dword [esp + 0x20], edi
mov edi, edx
mov dword [esp + 0x18], edx
sub ah, cl
sub al, ah
mov ecx, eax
shl esi, cl
shl edi, cl
mov dword [esp + 4], esi
mov esi, dword [esp + 8]
shld esi, edx, cl
mov ecx, dword [esp + 4]
test al, 0x20
cmovne esi, edi
mov dword [esp + 0x14], esi
mov esi, 0
cmovne edi, esi
cmovne ecx, esi
and al, 0x7f
mov dword [esp + 4], ecx
mov ecx, eax
sub cl, 0x40
cmovae edi, esi
mov esi, edx
mov edx, dword [esp + 8]
neg cl
mov dword [esp + 0xc], edi
mov edi, dword [esp + 8]
shr edx, cl
shrd esi, edi, cl
test cl, 0x20
mov ecx, eax
mov edi, dword [esp + 8]
cmove edx, esi
mov esi, dword [esp + 0x18]
add cl, 0xc0
or edx, dword [esp + 4]
shl esi, cl
test cl, 0x20
mov ecx, 0
cmovne esi, ecx
cmp al, 0x40
cmovb esi, edx
mov edx, dword [esp + 0x14]
cmovae edx, ecx
test al, al
cmove esi, ebx
movzx ecx, si
movzx esi, bx
mov ebx, 0
or ecx, dword [esp + 0xc]
or ecx, edx
mov edx, esi
setne ch
or ch, ah
xor eax, eax
mov cl, ch
shrd edx, eax, cl
mov cl, ch
shr edi, cl
test ch, 0x20
mov dword [esp + 0x14], edi
cmovne edi, eax
cmovne edx, eax
mov al, ch
and al, 0x7f
mov cl, al
mov byte [esp + 0xc], al
sub cl, 0x40
cmovae edx, ebx
neg cl
xor ebx, ebx
mov dword [esp + 4], edx
mov edx, esi
shld ebx, esi, cl
shl edx, cl
test cl, 0x20
cmovne ebx, edx
or ebx, edi
cmp al, 0x40
mov eax, 0
mov edi, dword [esp + 8]
cmovae ebx, eax
xor eax, eax
test cl, 0x20
mov cl, ch
cmovne edx, eax
mov eax, dword [esp + 0x18]
shrd eax, edi, cl
test ch, 0x20
mov ch, byte [esp + 0xc]
cmovne eax, dword [esp + 0x14]
xor edi, edi
mov cl, ch
add cl, 0xc0
or eax, edx
mov edx, dword [esp + 0x18]
shrd esi, edi, cl
test cl, 0x20
cmovne esi, edi
cmp ch, 0x40
mov edi, dword [esp + 0x20]
cmovb esi, eax
mov eax, dword [esp + 8]
test ch, ch
cmovne edx, esi
cmovne eax, ebx
movzx ebx, word [esp + 4]
mov dword [esp + 8], eax
mov eax, 0
mov esi, dword [esp + 8]
mov ecx, edx
or edi, eax
xor eax, eax
and cl, 7
shld ebx, esi, 0x1d
shld esi, edx, 0x1d
cmp cl, 5
setae al
add eax, esi
adc ebx, 0
mov edx, eax
adc edi, 0
and edx, 1
xor esi, esi
cmp cl, 4
cmove esi, edx
add esi, eax
adc ebx, 0
mov dword [esp + 0x70], esi
adc edi, 0
mov dword [esp + 0x74], ebx
mov word [esp + 0x78], di
fld xword [esp + 0x70]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret