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

Disassembly:
sub esp, 0x2c
push ebx
push esi
mov esi, dword [esp + 0x38]
xor ebx, ebx
mov eax, dword [esi]
movsx ecx, word [eax]
cmp ecx, ebx
mov dword [esi + 0x50], ecx
jne 0x46f8f4
mov word [esi + 0x30], bx
mov dword [esi + 0x5c], ebx
pop esi
pop ebx
add esp, 0x2c
ret
lea ecx, [ecx + ecx*2]
push ebp
push edi
push ebx
lea eax, [eax + ecx*4 + 2]
mov dword [esi + 0x60], eax
movsx ecx, word [eax]
mov dword [esp + 0x28], ecx
lea edx, [ecx + ecx*4]
movsx eax, word [eax + edx*2 + 2]
mov dword [esp + 0x2c], eax
mov dword [esi + 0x88], eax
mov eax, dword [esi + 0x50]
mov dword [esi + 0x8c], ecx
lea eax, [eax + eax*2]
shl eax, 2
push eax
call fcn.0048ebf0
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x84], eax
add ecx, ecx
xor ebp, ebp
push ecx
call fcn.0049dcd6
mov edx, dword [esi + 0x50]
mov edi, eax
add edx, edx
push edx
call fcn.0049dcd6
mov ecx, dword [esi + 0x50]
mov dword [esp + 0x24], eax
mov eax, dword [esi]
add esp, 0x10
add eax, 2
xor edx, edx
cmp ecx, ebx
mov dword [esp + 0x40], edx
jle 0x46f9ee
xor ecx, ecx
mov bx, word [eax + 8]
and ebx, 0x2000
test bx, bx
je 0x46f9dd
movsx edx, word [eax]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x84]
fild dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
fstp dword [ecx + edx]
movsx edx, word [eax + 2]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x84]
fild dword [esp + 0x20]
fstp dword [ecx + edx + 4]
movsx edx, word [eax + 4]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x84]
fild dword [esp + 0x20]
fstp dword [ecx + edx + 8]
mov dx, word [eax + 0xa]
mov word [ebx + ebp*2], dx
mov edx, dword [esp + 0x40]
mov ebx, ebp
or ebx, 0xffff8000
inc ebp
mov word [edi + edx*2], bx
add ecx, 0xc
mov ebx, dword [esi + 0x50]
inc edx
add eax, 0xc
cmp edx, ebx
mov dword [esp + 0x40], edx
jl 0x46f96e
xor ebx, ebx
mov eax, dword [esi]
mov ecx, dword [esi + 0x50]
xor edx, edx
add eax, 2
cmp ecx, ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x40], ebx
jle 0x46fac8
mov ebx, dword [esp + 0x14]
lea ecx, [ebp + ebp*2]
shl ecx, 2
lea ebx, [ebx + ebp*2]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], ebx
mov bx, word [eax + 8]
mov dword [esp + 0x1c], ebx
and ebx, 0x4000
test bx, bx
je 0x46faad
mov ebx, dword [esp + 0x1c]
and ebx, 0x2000
test bx, bx
jne 0x46faad
movsx ebx, word [eax]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esi + 0x84]
fild dword [esp + 0x1c]
fstp dword [ecx + ebx]
movsx ebx, word [eax + 2]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esi + 0x84]
fild dword [esp + 0x1c]
fstp dword [ecx + ebx + 4]
movsx ebx, word [eax + 4]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esi + 0x84]
fild dword [esp + 0x1c]
fstp dword [ecx + ebx + 8]
mov ebx, dword [esp + 0x18]
mov cx, word [eax + 0xa]
mov word [ebx], cx
mov ebx, dword [esp + 0x40]
lea ecx, [edx + ebp]
inc edx
mov word [edi + ebx*2], cx
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
add ecx, 0xc
add ebx, 2
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x40]
add eax, 0xc
inc ebx
cmp ebx, dword [esi + 0x50]
mov dword [esp + 0x40], ebx
jl 0x46fa1e
mov dword [esp + 0x20], edx
xor ebx, ebx
mov ecx, dword [esi]
xor eax, eax
add ecx, 2
cmp dword [esi + 0x50], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x40], eax
jle 0x46fb94
mov bx, word [ecx + 8]
mov dword [esp + 0x1c], ebx
and ebx, 0x2000
test bx, bx
jne 0x46fb7f
mov ebx, dword [esp + 0x1c]
and ebx, 0x4000
test bx, bx
jne 0x46fb7f
mov eax, dword [esp + 0x18]
movsx ebx, word [ecx]
add eax, edx
mov dword [esp + 0x1c], ebx
fild dword [esp + 0x1c]
mov ebx, dword [esi + 0x84]
lea edx, [eax + ebp]
lea eax, [edx + edx*2]
shl eax, 2
fstp dword [eax + ebx]
movsx ebx, word [ecx + 2]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esi + 0x84]
fild dword [esp + 0x1c]
fstp dword [eax + ebx + 4]
movsx ebx, word [ecx + 4]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esi + 0x84]
fild dword [esp + 0x1c]
fstp dword [eax + ebx + 8]
mov ebx, dword [esp + 0x14]
mov ax, word [ecx + 0xa]
mov word [ebx + edx*2], ax
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
lea ebx, [eax + edx]
mov eax, dword [esp + 0x40]
add ebx, ebp
mov word [edi + eax*2], bx
mov ebx, dword [esp + 0x18]
inc ebx
mov dword [esp + 0x18], ebx
mov ebx, dword [esi + 0x50]
inc eax
add ecx, 0xc
cmp eax, ebx
mov dword [esp + 0x40], eax
jl 0x46fae0
xor ebx, ebx
mov eax, dword [esi + 0x60]
mov dword [esi + 0x58], edx
mov edx, dword [esp + 0x24]
add eax, 2
cmp edx, ebx
mov dword [esi + 0x54], ebp
jle 0x46fc23
movsx ecx, word [eax]
test byte [edi + ecx*2 + 1], 0x80
lea ecx, [edi + ecx*2]
jne 0x46fbd6
movsx ebp, word [eax + 2]
test byte [edi + ebp*2 + 1], 0x80
jne 0x46fbd6
movsx ebp, word [eax + 4]
test byte [edi + ebp*2 + 1], 0x80
jne 0x46fbd6
movsx ebp, word [eax + 6]
test byte [edi + ebp*2 + 1], 0x80
je 0x46fbda
or byte [eax + 9], 0x40
mov cx, word [ecx]
add eax, 0xa
and ecx, 0x7fff
mov word [eax - 0xa], cx
movsx ecx, word [eax - 8]
mov cx, word [edi + ecx*2]
and ecx, 0x7fff
mov word [eax - 8], cx
movsx ecx, word [eax - 6]
mov cx, word [edi + ecx*2]
and ecx, 0x7fff
mov word [eax - 6], cx
movsx ecx, word [eax - 4]
mov cx, word [edi + ecx*2]
and ecx, 0x7fff
dec edx
mov word [eax - 4], cx
jne 0x46fba8
mov ecx, dword [esp + 0x28]
add eax, 2
cmp ecx, ebx
jle 0x46fc69
movsx edx, word [eax]
add eax, 8
mov dx, word [edi + edx*2]
and edx, 0x7fff
mov word [eax - 8], dx
movsx edx, word [eax - 6]
mov dx, word [edi + edx*2]
and edx, 0x7fff
mov word [eax - 6], dx
movsx edx, word [eax - 4]
mov dx, word [edi + edx*2]
and edx, 0x7fff
dec ecx
mov word [eax - 4], dx
jne 0x46fc2e
push edi
call fcn.0049e22d
push esi
call fcn.00471370
mov eax, dword [esi + 0x50]
push ebx
shl eax, 2
push eax
call fcn.0048ebf0
mov ecx, dword [esi + 0x50]
push ebx
shl ecx, 2
push ecx
mov dword [esi + 0x78], eax
call fcn.0048ebf0
xor edx, edx
mov dword [esi + 0x7c], eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edx
add esp, 0x18
mov dword [esp + 0x34], edx
mov dword [esi + 0x80], ebx
mov dword [esp + 0x38], edx
mov dword [esp + 0x38], eax
mov eax, dword [0x7538b5]
lea edi, [esi + 0x5c]
push ebx
push 4
lea edx, [esp + 0x34]
mov dword [esp + 0x34], 0x10
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0x112
mov ecx, dword [eax]
push edi
push edx
push eax
mov dword [esp + 0x30], edi
call dword [ecx + 0x24]
push eax
call fcn.0048f8a0
mov eax, dword [edi]
add esp, 4
lea edx, [esp + 0x10]
mov ecx, dword [eax]
push ebx
push edx
push 0x20
push eax
call dword [ecx + 0xc]
fild dword [esi + 0x14]
mov eax, dword [esi + 0x50]
xor ebp, ebp
cmp eax, ebx
fstp dword [esi + 0x64]
fild dword [esi + 0x18]
fstp dword [esi + 0x68]
fild dword [esi + 0x1c]
fstp dword [esi + 0x6c]
jle 0x46fe45
xor ecx, ecx
mov eax, dword [esi + 0x84]
mov edx, dword [esp + 0x10]
fld dword [ecx + eax]
fiadd dword [esi + 0x14]
add ecx, 0xc
fstp dword [edx]
mov eax, dword [esi + 0x84]
mov edx, dword [esp + 0x10]
fld dword [ecx + eax - 8]
fiadd dword [esi + 0x18]
fstp dword [edx + 4]
mov eax, dword [esi + 0x84]
mov edx, dword [esp + 0x10]
fld dword [ecx + eax - 4]
fiadd dword [esi + 0x1c]
fstp dword [edx + 8]
mov eax, dword [esi + 0x70]
mov edx, dword [ecx + eax - 0xc]
mov eax, dword [esp + 0x10]
mov dword [eax + 0xc], edx
mov edx, dword [esi + 0x70]
mov eax, dword [ecx + edx - 8]
mov edx, dword [esp + 0x10]
mov dword [edx + 0x10], eax
mov eax, dword [esi + 0x70]
mov edx, dword [ecx + eax - 4]
mov eax, dword [esp + 0x10]
mov dword [eax + 0x14], edx
mov edx, dword [esp + 0x14]
mov ax, word [edx + ebp*2]
mov edx, eax
mov edi, eax
and eax, 0x1f
sar edx, 7
shl eax, 3
and edx, 0xf8
mov dword [esp + 0x40], eax
sar edi, 2
mov eax, edx
and edi, 0xf8
and eax, 0xffff
mov ebx, edi
or eax, 0xffffff00
and ebx, 0xffff
shl eax, 8
or eax, ebx
mov ebx, dword [esp + 0x40]
shl eax, 8
and ebx, 0xffff
or eax, ebx
mov ebx, dword [esi + 0x78]
mov dword [ebx + ebp*4], eax
mov eax, dword [0x4b04a0]
imul eax, edx
mov edx, dword [0x4b04a4]
and eax, 0xffff
imul edx, edi
shr eax, 8
or eax, 0xffffff00
and edx, 0xffff
shl eax, 8
shr edx, 8
or eax, edx
mov edx, dword [0x4b04a8]
imul edx, dword [esp + 0x40]
and edx, 0xffff
shl eax, 8
shr edx, 8
or eax, edx
mov edx, dword [esi + 0x7c]
mov dword [edx + ebp*4], eax
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0x50]
add ebx, 0x20
inc ebp
mov dword [esp + 0x10], ebx
cmp ebp, eax
jl 0x46fd20
mov edi, dword [esp + 0x1c]
xor ebx, ebx
mov eax, dword [edi]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov edx, dword [esp + 0x14]
push edx
call fcn.0049e22d
mov ax, word [esi + 0x30]
add esp, 4
cmp ax, bx
mov dword [esi + 0x90], ebx
je 0x470228
movsx ecx, ax
push ebx
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*2]
add ecx, ecx
push ecx
call fcn.0048ebf0
add esp, 8
cmp word [esi + 0x30], bx
mov dword [esi + 0x90], eax
mov dword [esp + 0x40], ebx
jle 0x470228
mov edx, dword [0x52a218]
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x20], ebx
mov eax, dword [esi + 0xc]
mov bl, byte [eax + ebp + 0xf]
lea ecx, [eax + ebp]
cmp bl, 4
jne 0x46ff5d
cmp edx, 0x14
jl 0x46fedb
push 0x14
push str.Fog_Bulb_Discarded___More_Than__d
push 1
call fcn.00499ec0
add esp, 0xc
jmp 0x470204
lea ecx, [edx + edx*4]
xor ebx, ebx
lea eax, [edx + ecx*2]
shl eax, 3
inc edx
mov dword [eax + 0x52a258], 0
mov ecx, dword [esi + 0xc]
mov bl, byte [ecx + ebp + 0xc]
mov dword [eax + 0x52a254], ebx
mov ecx, dword [esi + 0xc]
fild dword [ecx + ebp]
fstp dword [eax + 0x52a220]
mov ecx, dword [esi + 0xc]
fild dword [ecx + ebp + 4]
fstp dword [eax + 0x52a224]
mov ecx, dword [esi + 0xc]
fild dword [ecx + ebp + 8]
fstp dword [eax + 0x52a228]
mov ecx, dword [esi + 0xc]
mov ecx, dword [ecx + ebp + 0x16]
mov dword [eax + 0x52a244], ecx
mov ecx, dword [esi + 0xc]
fld dword [ecx + ebp + 0x16]
fld st(0)
fmulp st(1)
mov dword [0x52a218], edx
fst dword [eax + 0x52a248]
fld dword [0x4a72fc]
fdiv st(1)
fstp dword [eax + 0x52a24c]
fstp st(0)
jmp 0x47020a
mov al, byte [ecx + 0xc]
test al, al
jne 0x46ff77
cmp byte [ecx + 0xd], al
jne 0x46ff77
cmp byte [ecx + 0xe], al
jne 0x46ff77
cmp bl, 2
je 0x47020a
and eax, 0xff
mov edx, dword [esi + 0x90]
mov dword [esp + 0x28], eax
xor ecx, ecx
fild dword [esp + 0x28]
mov ebx, dword [esp + 0x20]
fmul dword [0x4a72f8]
fstp dword [edi + edx + 0xc]
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x90]
mov cl, byte [eax + ebp + 0xd]
mov dword [esp + 0x28], ecx
xor ecx, ecx
fild dword [esp + 0x28]
fmul dword [0x4a72f8]
fstp dword [edi + edx + 0x10]
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x90]
mov cl, byte [eax + ebp + 0xe]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fmul dword [0x4a72f8]
fstp dword [edi + edx + 0x14]
mov eax, dword [esi + 0xc]
movsx ecx, word [ebx + eax + 0x10]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fcom dword [0x4a7270]
fnstsw ax
test ah, 5
jp 0x46fff9
fchs
fmul dword [0x4a72f4]
mov edx, dword [esi + 0x90]
lea eax, [edi + edx + 0xc]
fld st(0)
fmul dword [eax]
fstp dword [eax]
mov eax, dword [esi + 0x90]
fld st(0)
fmul dword [edi + eax + 0x10]
lea eax, [edi + eax + 0x10]
fstp dword [eax]
mov ecx, dword [esi + 0x90]
fld st(0)
fmul dword [edi + ecx + 0x14]
lea eax, [edi + ecx + 0x14]
fstp dword [eax]
mov edx, dword [esi + 0xc]
cmp byte [ebx + edx + 0xf], 3
jne 0x470054
fmul dword [0x4a72f0]
call fcn.0049da5c
mov ecx, dword [esi + 0x90]
mov dword [edi + ecx + 0x18], eax
jmp 0x470056
fstp st(0)
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
fild dword [edx + ebp]
fstp dword [edi + eax]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x90]
fild dword [ecx + ebp + 4]
fstp dword [edi + edx + 4]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x90]
fild dword [eax + ebp + 8]
fstp dword [edi + ecx + 8]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
mov ecx, dword [edx + ebp]
mov dword [edi + eax + 0x3c], ecx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
mov ecx, dword [edx + ebp + 4]
mov dword [edi + eax + 0x40], ecx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
mov ecx, dword [edx + ebp + 8]
mov dword [edi + eax + 0x44], ecx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
fld dword [edx + ebp + 0x22]
fchs
fstp dword [edi + eax + 0x30]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x90]
fld dword [ecx + ebp + 0x26]
fchs
fstp dword [edi + edx + 0x34]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x90]
fld dword [eax + ebp + 0x2a]
fchs
fstp dword [edi + ecx + 0x38]
mov edx, dword [esi + 0xc]
fld dword [edx + ebp + 0x22]
fmul dword [0x4a72ec]
call fcn.0049da5c
mov ecx, dword [esi + 0x90]
mov dword [edi + ecx + 0x48], eax
mov edx, dword [esi + 0xc]
fld dword [edx + ebp + 0x26]
fmul dword [0x4a72ec]
call fcn.0049da5c
mov ecx, dword [esi + 0x90]
mov dword [edi + ecx + 0x4c], eax
mov edx, dword [esi + 0xc]
fld dword [edx + ebp + 0x2a]
fmul dword [0x4a72ec]
call fcn.0049da5c
mov ecx, dword [esi + 0x90]
mov dword [edi + ecx + 0x50], eax
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
mov ecx, dword [edx + ebp + 0x12]
mov dword [edi + eax + 0x1c], ecx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x90]
mov ecx, dword [edx + ebp + 0x16]
mov dword [edi + eax + 0x20], ecx
mov edx, dword [esi + 0xc]
fld dword [edx + ebp + 0x12]
call fcn.0049e320
mov eax, dword [esi + 0x90]
fadd st(0), st(0)
fstp dword [edi + eax + 0x24]
mov ecx, dword [esi + 0xc]
fld dword [ecx + ebp + 0x16]
call fcn.0049e320
mov edx, dword [esi + 0x90]
fadd st(0), st(0)
fstp dword [edi + edx + 0x28]
mov eax, dword [esi + 0xc]
cmp byte [ebx + eax + 0xf], 2
jne 0x4701d8
mov ecx, dword [esi + 0x90]
fld dword [edi + ecx + 0x28]
fcomp dword [0x4a72e8]
fnstsw ax
and eax, 0x4100
jne 0x4701d8
push str.SpotLight_Corrected
push 1
call fcn.00499ec0
mov edx, dword [esi + 0x90]
add esp, 8
mov dword [edi + edx + 0x28], 0x40490fdb
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x90]
add ebx, 0x2e
add edi, 0x56
mov edx, dword [eax + ebp + 0x1e]
mov dword [esp + 0x20], ebx
mov dword [edi + ecx - 0x2a], edx
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x90]
mov dl, byte [eax + ebp + 0xf]
mov byte [edi + ecx - 2], dl
mov edx, dword [0x52a218]
mov eax, dword [esp + 0x40]
add ebp, 0x2e
movsx ecx, word [esi + 0x30]
inc eax
cmp eax, ecx
mov dword [esp + 0x40], eax
jl 0x46fead
mov edi, dword [esp + 0x1c]
xor ebx, ebx
movsx eax, word [esi + 0x30]
cmp eax, dword [0x536dd4]
jle 0x470239
mov dword [0x536dd4], eax
mov edi, dword [edi]
mov eax, dword [0x7538bd]
push ebx
push eax
mov edx, dword [edi]
push edi
call dword [edx + 0x1c]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x2c
ret