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

Disassembly:
sub esp, 0x44
push ebx
push ebp
mov ebp, dword [esp + 0x50]
mov ecx, dword [ebp + 0x1e8]
push esi
xor eax, eax
push edi
mov edi, dword [esp + 0x5c]
mov esi, 1
cmp dword [edi + 0x1e8], esi
mov dword [esp + 0x30], ecx
setne al
cmp dword [ebp + 0x11e0], 0
mov dword [esp + 0x34], eax
je 0x46ebd3
cmp dword [ebp + 0x11b4], 0
jne 0x46f3c1
push edi
push ebp
call fcn.00470140
add esp, 8
mov dword [ebp + 0x11b4], esi
xor ebx, ebx
mov dword [esp + 0x14], ebx
xor edx, edx
lea ecx, [edi + 0x1100]
cmp dword [ecx], ebx
je 0x46ebf9
mov eax, dword [ecx + 4]
and eax, dword [ebp + 0x11bc]
test al, 7
je 0x46ebf9
test eax, 0xfffffff8
jne 0x46ec05
add edx, esi
add ecx, 0x14
cmp edx, 8
jl 0x46ebe1
jmp 0x46ec0b
mov ebx, esi
mov dword [esp + 0x14], esi
cmp dword [ebp + 0x1238], 0xffffffff
lea esi, [ebp + 0x11b0]
jne 0x46ec24
mov dword [esp + 0x14], 0
jmp 0x46ec2c
test ebx, ebx
jne 0x46ecb6
mov edx, dword [ebp + 0x26c]
mov ebx, edi
call fcn.004650e0
mov dword [esp + 0x58], eax
test eax, eax
jne 0x46ec9b
mov edx, dword [ebp + 0x64]
mov esi, dword [ebp + 0x26c]
push eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
push eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edx
call fcn.004030f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x46f3c1
mov edx, dword [ebp + 0x26c]
mov ecx, dword [edx + 4]
imul ecx, eax
add ecx, dword [edx + 0x18]
mov dword [esp + 0x58], ecx
jmp 0x46ec9f
mov ecx, dword [esp + 0x58]
xor eax, eax
lea esi, [ebp + 0x11b0]
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0xc], eax
mov edx, dword [esi + 0x10]
mov dword [ecx + 8], edx
mov eax, dword [esi + 0xa8]
mov edx, dword [esp + 0x30]
mov ebx, dword [0x52b40c]
mov dword [ebp + 0x218], eax
mov ecx, dword [esi + 0xac]
mov eax, dword [edi + 0xc3c]
mov dword [edi + 0x218], ecx
cmp dword [edi + 0x1e8], edx
je 0x46eddf
fild dword [edi + 0x12b0]
fstp dword [esp + 0x18]
test eax, eax
je 0x46ed18
mov eax, dword [edi + 0xc38]
cmp eax, 0xffffffff
je 0x46ed18
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46ed18
mov eax, dword [eax]
fld dword [eax + 0xa4]
jmp 0x46ed20
mov ecx, dword [edi]
fld dword [ecx + 0xa4]
cmp dword [ebp + 0xc3c], 0
fmul dword [esp + 0x18]
fstp dword [esp + 0x24]
fild dword [esi + 0x100]
fstp dword [esp + 0x18]
je 0x46ed5b
mov eax, dword [ebp + 0xc38]
cmp eax, 0xffffffff
je 0x46ed5b
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46ed5b
mov edx, dword [eax]
fld dword [edx + 0xa4]
jmp 0x46ed64
mov eax, dword [ebp]
fld dword [eax + 0xa4]
cmp dword [ebp + 0xe58], 3
fmul dword [esp + 0x18]
mov ecx, dword [ebp + 0x1e8]
mov dword [esp + 0x28], ecx
fstp dword [esp + 0x1c]
jne 0x46ed8b
mov edx, dword [ebp + 0x90]
mov dword [esp + 0x18], edx
jmp 0x46ed95
mov eax, dword [ebp + 0x88]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
mov eax, dword [ebp]
add eax, 0xa4
sub esp, 8
fmul dword [eax]
mov dword [esp + 0x34], eax
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fadd qword [0x4a6ba0]
fstp qword [esp]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fld dword [esp + 0x1c]
fadd dword [esp + 0x24]
faddp st(1)
jmp 0x46eeff
mov ecx, dword [edi + 0x12b0]
neg ecx
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
fstp dword [esp + 0x24]
test eax, eax
je 0x46ee17
mov eax, dword [edi + 0xc38]
cmp eax, 0xffffffff
je 0x46ee17
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46ee17
mov edx, dword [eax]
fld dword [edx + 0xa4]
jmp 0x46ee1f
mov eax, dword [edi]
fld dword [eax + 0xa4]
cmp dword [ebp + 0xc3c], 0
fmul dword [esp + 0x24]
fstp dword [esp + 0x1c]
fild dword [esi + 0x100]
fstp dword [esp + 0x24]
je 0x46ee5a
mov eax, dword [ebp + 0xc38]
cmp eax, 0xffffffff
je 0x46ee5a
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46ee5a
mov ecx, dword [eax]
fld dword [ecx + 0xa4]
jmp 0x46ee63
mov edx, dword [ebp]
fld dword [edx + 0xa4]
mov ecx, dword [ebp + 0x1e8]
fmul dword [esp + 0x24]
mov eax, ecx
neg eax
cmp dword [ebp + 0xe58], 3
fstp dword [esp + 0x24]
mov dword [esp + 0x28], ecx
jne 0x46ee9a
cmp ecx, eax
jne 0x46ee8e
mov eax, dword [ebp + 0x90]
jmp 0x46eeb0
mov ecx, dword [ebp + 0x8c]
mov dword [esp + 0x18], ecx
jmp 0x46eeb4
cmp ecx, eax
jne 0x46eeaa
mov edx, dword [ebp + 0x88]
mov dword [esp + 0x18], edx
jmp 0x46eeb4
mov eax, dword [ebp + 0x84]
mov dword [esp + 0x18], eax
fld dword [esp + 0x1c]
mov eax, dword [ebp]
fsub dword [esp + 0x24]
add eax, 0xa4
fild dword [esp + 0x18]
sub esp, 8
mov dword [esp + 0x34], eax
fmul dword [eax]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fadd qword [0x4a6ba0]
fstp qword [esp]
fstp qword [esp + 0x24]
call sub.MSVCR90.dll_floor
add esp, 8
call fcn.00499690
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fsubr qword [esp + 0x1c]
call fcn.00499690
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub dword [ebp + 0x20c]
fimul dword [esp + 0x28]
fmul dword [ebp + 0x13a8]
fadd dword [ebp + 0x13b4]
fild dword [ebx + 0x10f10]
fmul dword [ebx + 0x1b74]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fadd dword [ebx + 0x10ef8]
fstp dword [esp + 0x28]
fadd dword [esp + 0x28]
call fcn.00499690
fild dword [edi + 0x12b4]
cmp dword [edi + 0xc3c], 0
mov dword [esp + 0x18], eax
fstp dword [esp + 0x28]
je 0x46ef80
mov eax, dword [edi + 0xc38]
cmp eax, 0xffffffff
je 0x46ef80
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46ef80
mov ecx, dword [eax]
fld dword [ecx + 0xa4]
jmp 0x46ef88
mov edx, dword [edi]
fld dword [edx + 0xa4]
cmp dword [ebp + 0xc3c], 0
fmul dword [esp + 0x28]
fstp dword [esp + 0x24]
fild dword [esi + 0x104]
fstp dword [esp + 0x28]
je 0x46efc7
mov eax, dword [ebp + 0xc38]
cmp eax, 0xffffffff
je 0x46efc7
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46efc7
mov eax, dword [eax]
fld dword [eax + 0xa4]
fmul dword [esp + 0x28]
jmp 0x46efd1
fld dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
fmul dword [ecx]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fadd dword [esp + 0x24]
fsub dword [edi + 0x210]
fmul dword [edi + 0x13a8]
fadd dword [edi + 0x13b8]
fild dword [ebx + 0x10f14]
fmul dword [ebx + 0x1b74]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fadd dword [ebx + 0x10efc]
fstp dword [esp + 0x2c]
fadd dword [esp + 0x2c]
call fcn.00499690
cmp dword [esp + 0x14], 0
mov dword [esp + 0x2c], eax
jne 0x46f08a
mov edx, dword [esp + 0x30]
fld dword [ebp + 0x1f8]
push 0
push edx
sub esp, 8
fstp dword [esp + 4]
xor ecx, ecx
fld dword [ebp + 0x1f4]
mov edx, edi
fstp dword [esp]
push esi
mov ebx, ebp
call fcn.0046db20
add esp, 0x14
cmp dword [edi + 0x10c8], 0
jne 0x46f05c
test byte [esi + 0x78], 1
je 0x46f06d
mov ecx, dword [esi + 0x34]
mov eax, dword [esp + 0x58]
sub dword [eax + 4], ecx
mov dword [esi + 0x34], 0
cmp dword [esi + 0x108], 0
mov ebx, dword [0x52b40c]
je 0x46f08a
mov edx, dword [ebp + 0x1e8]
neg edx
mov dword [ebp + 0x1ec], edx
mov eax, dword [esi + 0x54]
mov dword [ebp + 0xe74], eax
mov ecx, dword [esi + 0x50]
mov dword [edi + 0xe74], ecx
mov eax, dword [ebx + 0x11710]
xor edx, edx
cmp eax, 3
je 0x46f0d9
cmp eax, 4
je 0x46f0d9
mov eax, dword [ebp + 0x1c8]
mov ecx, dword [esi + 0x40]
add dword [eax], ecx
mov eax, dword [ebp + 0x1c8]
cmp dword [eax], edx
jge 0x46f0c5
mov dword [eax], edx
mov ecx, dword [ebp + 0x1cc]
mov eax, dword [ebp + 0x1c8]
mov ecx, dword [ecx]
cmp dword [eax], ecx
jle 0x46f0d9
mov dword [eax], ecx
mov eax, 0xfff
mov dword [edi + 0x105c], eax
mov dword [edi + 0x1058], eax
mov dword [edi + 0xe8c], 4
mov dword [edi + 0xe90], edx
mov dword [edi + 0x1060], edx
mov dword [edi + 0x1064], edx
mov eax, dword [esi + 0x54]
inc eax
mov dword [edi + 0x1054], eax
test dword [esi + 0xc], 0x1c0
je 0x46f123
mov ecx, dword [esi + 0x54]
inc ecx
mov dword [ebp + 0x1054], ecx
mov eax, dword [esi + 0x58]
add dword [ebp + 0x13f4], eax
mov ecx, dword [esi + 0x58]
add dword [ebp + 0x13f8], ecx
mov eax, dword [esi + 0x58]
add dword [ebp + 0x13fc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0xe90], edx
mov edx, eax
imul edx, edx, 0x1d4
mov dword [ebp + 0xe8c], 2
mov ecx, dword [esi + 0x58]
lea edx, [edx + ebx + 0xdcf8]
cmp eax, 1
je 0x46f16d
cmp eax, 2
jne 0x46f1b6
lea eax, [eax + eax*2]
add dword [ebx + eax*8 + 0x117fc], ecx
cmp dword [ebx + eax*8 + 0x117f8], 0
mov ecx, dword [ebx + eax*8 + 0x117fc]
lea eax, [ebx + eax*8 + 0x117f8]
jne 0x46f19a
cmp ecx, 2
jl 0x46f1b6
mov ebx, dword [edx + 8]
mov dword [eax + 0x10], ebx
cmp ecx, 2
jl 0x46f1b6
cmp ecx, 0x3e7
mov edx, dword [edx + 0xc]
mov dword [eax], edx
mov dword [eax + 0xc], ecx
jle 0x46f1b6
mov dword [eax + 0xc], 0x3e7
cmp dword [esp + 0x14], 0
jne 0x46f1e3
mov esi, dword [esi + 0x1a4]
test esi, esi
jg 0x46f1cc
cmp esi, 0xffffffff
jne 0x46f1e3
add edi, 0x1438
lea esi, [ebp + 0x1350]
mov ecx, 0xf
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x5c]
mov eax, dword [esp + 0x34]
mov ecx, dword [ebp + 0x12a4]
mov edx, dword [esp + 0x2c]
push 0
push eax
mov eax, dword [esp + 0x20]
lea esi, [ebp + 0x11b0]
push ecx
mov ecx, dword [esi + 0xf0]
push edx
push eax
push ebp
call fcn.00470260
add esp, 0x18
cmp dword [esp + 0x14], 0
jne 0x46f3aa
mov esi, dword [esi + 0x84]
cmp esi, 0xffffffff
je 0x46f233
mov eax, esi
mov edi, ebp
call fcn.0046af10
mov edi, dword [esp + 0x5c]
cmp dword [ebp + 0x123c], 0
je 0x46f2a6
mov ecx, dword [ebp + 0x1244]
mov dword [edi + 0xc3c], ecx
mov edx, dword [ebp + 0x1240]
mov dword [edi + 0xc38], edx
mov eax, dword [ebp + 0x124c]
mov edx, dword [edi + 0x9b0]
mov dword [edi + 0xc44], eax
mov ecx, dword [ebp + 0x1248]
mov dword [edi + 0xc40], ecx
cmp edx, dword [ebp + 0x1248]
je 0x46f29c
push 0x80
lea eax, [edi + 0x9b4]
push 0
push eax
call sub.MSVCR90.dll_memset
mov ecx, dword [ebp + 0x1248]
add esp, 0xc
mov dword [edi + 0x9b0], ecx
mov dword [edi + 0xe5c], 2
cmp dword [ebp + 0x1238], 0xffffffff
je 0x46f2e9
mov esi, dword [esp + 0x5c]
push 0
push esi
call fcn.00470140
mov edx, dword [esi + 4]
mov eax, dword [0x52b40c]
mov edi, dword [eax + 0xfcb0]
push edx
call fcn.00446320
mov eax, dword [ebp + 0x1238]
add esp, 0xc
mov edi, esi
call fcn.0046af10
mov dword [esi + 0xe64], 0
mov ecx, dword [ebp + 0x1254]
mov edx, dword [esp + 0x58]
mov ebx, dword [0x52b40c]
lea esi, [ebp + 0x11b0]
mov dword [edx + 0x14], ecx
fild dword [esi + 0x118]
cmp dword [ebp + 0xc3c], 0
fstp dword [esp + 0x5c]
je 0x46f335
mov eax, dword [ebp + 0xc38]
cmp eax, 0xffffffff
je 0x46f335
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46f335
mov eax, dword [eax]
fld dword [eax + 0xa4]
jmp 0x46f33e
mov ecx, dword [ebp]
fld dword [ecx + 0xa4]
fmul dword [esp + 0x5c]
fstp dword [esp + 0x5c]
fld dword [esp + 0x5c]
call fcn.00499690
mov edx, dword [esp + 0x58]
mov dword [edx + 0xc], eax
fild dword [esi + 0x11c]
cmp dword [ebp + 0xc3c], 0
fstp dword [esp + 0x5c]
je 0x46f389
mov eax, dword [ebp + 0xc38]
cmp eax, 0xffffffff
je 0x46f389
mov eax, dword [ebx + eax*4 + 0x11230]
test eax, eax
je 0x46f389
mov eax, dword [eax]
fld dword [eax + 0xa4]
jmp 0x46f392
mov ecx, dword [ebp]
fld dword [ecx + 0xa4]
fmul dword [esp + 0x5c]
fstp dword [esp + 0x5c]
fld dword [esp + 0x5c]
call fcn.00499690
mov edx, dword [esp + 0x58]
mov dword [edx + 0x10], eax
mov dword [edi + 0x11b0], 0
cmp dword [esi + 0x30], 0
je 0x46f3c1
mov dword [esi + 4], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret