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

Disassembly:
sub esp, 0xfc
push ebx
mov ebx, dword [esp + 0x104]
push ebp
push esi
mov esi, eax
mov eax, dword [ebx + 0x40]
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x44], ebp
je 0x500b04
cmp dword [esp + 0x120], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x34], ebp
jne 0x5004bc
mov dword [esp + 0x34], 0xbf800000
mov eax, dword [esp + 0x118]
cmp eax, ebp
mov dword [esp + 0xc], ebp
je 0x500548
movsx ecx, word [eax]
movsx edx, word [eax + 4]
mov dword [esp + 0x10], ecx
movsx ecx, word [eax + 2]
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
movsx edx, word [eax + 6]
fstp dword [esp + 0x1c]
fild dword [esp + 0x10]
mov dword [esp + 0x10], ecx
fstp dword [esp + 0x24]
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
fstp dword [esp + 0x28]
fild dword [esp + 0x10]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fcomp dword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x500529
fld dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
fstp dword [esp + 0x24]
mov dword [esp + 0x1c], eax
fld dword [esp + 0x28]
fcomp dword [esp + 0x18]
fnstsw ax
test ah, 0x41
jne 0x500548
fld dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
fstp dword [esp + 0x18]
mov dword [esp + 0x28], ecx
mov eax, dword [0xf91614]
mov edx, dword [eax + 8]
push edi
lea ecx, [edx + 0x20]
mov dword [eax + 8], ecx
xor eax, eax
push eax
push eax
push eax
push edx
mov edi, edx
mov dword [esp + 0x6c], edx
lea edx, [esp + 0x78]
push edx
mov ecx, 8
push 1
mov edx, 0x54
rep stosd dword es:[edi], eax
call fcn.00515c30
mov eax, dword [esp + 0x74]
add esp, 0x18
push esi
lea ecx, [esp + 0x70]
push ecx
mov byte [eax + 0x15], 4
mov byte [esp + 0x68], 1
call fcn.004931a0
push esi
lea edx, [esp + 0x98]
push edx
call fcn.004931a0
push esi
lea eax, [esp + 0xc0]
push eax
call fcn.004931a0
push esi
lea ecx, [esp + 0xe8]
push ecx
call fcn.004931a0
mov ecx, dword [ebx + 0x40]
mov edx, dword [esp + 0x114]
mov eax, dword [ecx + 0x14]
mov edi, dword [ebx + 0x2124]
mov dword [esp + 0x58], edx
movzx edx, word [ecx + 0xa]
add eax, ecx
push 0x73
mov dword [esp + 0x58], 0
call fcn.004ff010
add esp, 4
test eax, eax
je 0x500619
cmp edi, 0x10
jne 0x5005fe
mov ax, word [eax + 0xe]
jmp 0x500603
movsx ax, byte [eax + 8]
movsx eax, ax
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmul dword [esp + 0x128]
fstp dword [esp + 0x54]
mov ecx, dword [esp + 0x120]
movzx ecx, word [ecx]
test cx, cx
mov eax, 1
mov dword [esp + 0x50], ecx
mov dword [esp + 0x14], eax
je 0x500a80
lea esp, [esp]
mov ecx, dword [esp + 0x130]
test ecx, ecx
jl 0x500653
cmp eax, ecx
jg 0x500a80
movzx ecx, word [esp + 0x50]
cmp ecx, 0xa
je 0x500abd
cmp ecx, 0x20
je 0x500670
cmp ecx, 0x40
jne 0x500687
cmp eax, 1
jle 0x500687
fld dword [esp + 0x54]
fadd dword [esp + 0x114]
fstp dword [esp + 0x114]
jmp 0x500a57
mov esi, dword [ebx + 0x40]
movzx edx, word [esi + 0xa]
mov eax, dword [esi + 0x14]
add eax, esi
push ecx
call fcn.004ff010
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x500a53
mov al, byte [ebx + 0x211d]
test al, al
je 0x5006db
movzx edx, word [esp + 0x10]
mov eax, ebp
mov ecx, esi
call fcn.00500b50
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmul dword [esp + 0x128]
fadd dword [esp + 0x114]
fstp dword [esp + 0x114]
movsx edx, byte [ebp + 9]
movsx eax, byte [ebp + 0xa]
mov dword [esp + 0x10], edx
movzx edx, byte [ebp + 3]
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
movzx eax, byte [ebp + 2]
fmul dword [esp + 0x128]
movzx esi, word [ebp + 4]
fadd dword [esp + 0x114]
movzx ecx, word [ebp + 6]
fstp dword [esp + 0x18]
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
lea edi, [esi + eax + 1]
mov dword [esp + 0x3c], ecx
fmul dword [esp + 0x12c]
mov dword [esp + 0x40], edi
fadd dword [esp + 0x118]
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
lea edx, [ecx + edx + 1]
fmul dword [esp + 0x128]
fadd dword [esp + 0x18]
fstp dword [esp + 0x24]
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
fmul dword [esp + 0x12c]
fadd st(1)
fstp dword [esp + 0x30]
fld dword [esp + 0x18]
fcomp dword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x5007a2
fld dword [esp + 0x18]
mov eax, dword [esp + 0x24]
fstp dword [esp + 0x24]
mov dword [esp + 0x18], eax
mov dword [esp + 0x3c], edx
fstp dword [esp + 0x10]
mov eax, dword [esp + 0x10]
fld dword [esp + 0x30]
mov dword [esp + 0x30], eax
mov eax, esi
mov esi, edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x11c]
test eax, eax
je 0x500902
fld dword [esp + 0x18]
xor edi, edi
fcomp dword [esp + 0x20]
xor ecx, ecx
fnstsw ax
test ah, 5
jp 0x5007c9
mov edi, 1
fld dword [esp + 0x18]
fcomp dword [esp + 0x28]
fnstsw ax
test ah, 1
jne 0x5007db
or edi, 2
fcom dword [esp + 0x2c]
fnstsw ax
test ah, 5
jp 0x5007e9
or edi, 4
fcom dword [esp + 0x1c]
fnstsw ax
test ah, 1
jne 0x5007f7
or edi, 8
fld dword [esp + 0x24]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x50080b
mov ecx, 1
fld dword [esp + 0x24]
fcomp dword [esp + 0x28]
fnstsw ax
test ah, 1
jne 0x50081d
or ecx, 2
fld dword [esp + 0x30]
fcomp dword [esp + 0x2c]
fnstsw ax
test ah, 5
jp 0x50082f
or ecx, 4
fld dword [esp + 0x30]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 1
jne 0x500841
or ecx, 8
test edi, ecx
setne al
or ecx, edi
test al, al
mov byte [esp + 0x37], al
mov dword [esp + 0x44], ecx
jne 0x5008ec
test cl, 1
je 0x500878
fld dword [esp + 0x20]
fsub dword [esp + 0x18]
call fcn.00581d24
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x44]
add esi, eax
test cl, 2
je 0x5008a0
fld dword [esp + 0x24]
fsub dword [esp + 0x28]
call fcn.00581d24
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x28]
sub ecx, eax
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x24], edx
test cl, 4
je 0x5008c4
fld dword [esp + 0x2c]
fsub st(1)
call fcn.00581d24
fstp st(0)
mov ecx, dword [esp + 0x3c]
fld dword [esp + 0x2c]
add ecx, eax
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x44]
test cl, 8
je 0x5008ec
fld dword [esp + 0x30]
fsub dword [esp + 0x1c]
call fcn.00581d24
mov ecx, dword [esp + 0x10]
sub ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x48]
mov al, byte [esp + 0x37]
or edx, ecx
test al, al
mov dword [esp + 0x48], edx
jne 0x500a1b
movsx ecx, word [ebx + 0x44]
fst dword [esp + 0x70]
mov eax, esi
fld dword [esp + 0x24]
shl eax, 0xc
fadd dword [0x5befcc]
sub eax, 0x800
cdq
idiv ecx
movsx edi, word [ebx + 0x46]
mov esi, eax
mov eax, dword [esp + 0x3c]
shl eax, 0xc
sub eax, 0x800
cdq
idiv edi
mov word [esp + 0x7c], si
mov word [esp + 0xf4], si
mov ebx, eax
mov eax, dword [esp + 0x40]
shl eax, 0xc
sub eax, 0x800
cdq
idiv ecx
mov word [esp + 0x7e], bx
mov word [esp + 0xa6], bx
mov ecx, eax
mov eax, dword [esp + 0x10]
fst dword [esp + 0x10]
shl eax, 0xc
fstp dword [esp + 0x94]
sub eax, 0x800
cdq
fstp dword [esp + 0x98]
idiv edi
fld dword [esp + 0x30]
fadd dword [0x5befcc]
fst dword [esp + 0xc0]
fstp dword [esp + 0xe8]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x74], edx
mov dword [esp + 0x9c], edx
mov edx, dword [esp + 0x10]
mov word [esp + 0xa4], cx
mov dword [esp + 0xbc], edx
mov edx, dword [esp + 0x38]
mov word [esp + 0xcc], cx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0xc4], edx
mov dword [esp + 0xe4], ecx
mov dword [esp + 0xec], edx
mov word [esp + 0xce], ax
mov word [esp + 0xf6], ax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x70]
call fcn.0050b810
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x110]
inc eax
mov dword [esp + 0x4c], eax
jmp 0x500a1d
fstp st(0)
mov edi, dword [ebx + 0x2124]
cmp edi, 0x10
jne 0x500a2e
mov bp, word [ebp + 0xe]
jmp 0x500a33
movsx bp, byte [ebp + 8]
movsx ecx, bp
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fmul dword [esp + 0x128]
fadd dword [esp + 0x114]
fstp dword [esp + 0x114]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x120]
movzx ecx, word [ecx + eax*2]
mov edx, dword [esp + 0x50]
mov ebp, dword [esp + 0x48]
inc eax
test cx, cx
mov dword [esp + 0x10], edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x14], eax
jne 0x500640
call fcn.00515d10
mov eax, dword [esp + 0x4c]
test eax, eax
pop edi
je 0x500b04
mov eax, dword [esp + 0x120]
test eax, eax
je 0x500af2
mov edx, dword [esp + 0x58]
mov cx, word [ebx + 8]
push 0x1fc20
push eax
call fcn.0050d050
add esp, 8
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0xfc
ret 0x24
mov edx, dword [ebx + 0x3c]
fild dword [ebx + 0x3c]
test edx, edx
jge 0x500acd
fadd dword [0x5befa4]
fmul dword [esp + 0x12c]
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x114], ecx
fadd dword [esp + 0x118]
fstp dword [esp + 0x118]
jmp 0x500a57
mov ecx, dword [esp + 0x58]
mov dx, word [ebx + 8]
mov eax, 0x1fc20
call fcn.0050cfd0
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0xfc
ret 0x24