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

Disassembly:
push 0xffffffffffffffff
push 0x4c724f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c8
mov eax, dword [0x51eea4]
xor eax, dword [esp + 0x1d4]
push ebx
push ebp
push esi
mov dword [esp + 0x1d0], eax
push edi
mov esi, ecx
mov al, byte [esi + 8]
xor edi, edi
test al, al
mov dword [esp + 0x1e0], edi
mov dword [esp + 0x1c8], edi
mov dword [esp + 0x1cc], edi
mov dword [esp + 0x1d0], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], edi
mov byte [esp + 0x13], 0
jne 0x49f6df
mov al, byte [esi + 0x2d4]
test al, al
jne 0x49f6df
xor edx, edx
mov ebx, 0x10
mov ecx, dword [esi + 0x10]
cmp ecx, edi
mov dword [esp + 0x14], edx
jne 0x49efde
xor eax, eax
jmp 0x49efe6
mov eax, dword [esi + 0x14]
sub eax, ecx
sar eax, 2
cmp edx, eax
jge 0x49f6df
mov eax, dword [esi + 0x10]
lea ecx, [edx*4]
mov ebp, dword [ecx + eax]
cmp ebp, edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x54], ebp
je 0x49f00a
inc dword [ebp + 4]
mov al, byte [ebp + 0x29]
test al, al
mov byte [esp + 0x1e0], 1
je 0x49f571
mov eax, dword [ebp + 0x14]
cmp eax, dword [esi + 0x1e0]
jge 0x49f031
mov byte [ebp + 0x29], 0
jmp 0x49f6b9
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x49f051
mov eax, dword [esi + 0x14]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x49f051
mov eax, ecx
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
mov dword [esi + 0x340], eax
mov al, byte [esp + 0x13]
test al, al
jne 0x49f061
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x24], ecx
mov edx, dword [esi + 0x2b8]
mov edi, dword [esp + 0x18]
mov eax, dword [ebp + 0x30]
inc edx
imul edx, dword [str._n2Px_dx_]
add edi, edx
mov dword [esp + 0x18], edi
or edi, 0xffffffff
cmp eax, 1
mov byte [esp + 0x13], 1
jne 0x49f08e
mov edi, dword [ebp + 0x34]
jmp 0x49f099
cmp eax, 2
jne 0x49f0c2
mov edi, dword [ebp + 0x34]
add edi, 4
test edi, edi
jl 0x49f0ae
mov edx, dword [esp + 0x18]
mov ecx, dword [edi*4 + 0x51c4b8]
add edx, ecx
mov dword [esp + 0x18], edx
cmp eax, 2
jne 0x49f0c2
cmp dword [ebp + 0x34], 7
jne 0x49f0c2
call fcn.0043f0a0
mov byte [eax + 0x10], 1
cmp dword [ebp + 0x30], 2
jne 0x49f0d7
cmp dword [ebp + 0x34], 3
jne 0x49f0d7
call fcn.0043f0a0
mov byte [eax + 0x11], 1
cmp edi, 0xffffffff
jle 0x49f54a
push str.back
lea ecx, [esp + 0x5c]
call fcn.004033c0
push str.freeze
lea ecx, [esp + 0x78]
mov byte [esp + 0x1e4], 2
call fcn.004033c0
push str.rockets
lea ecx, [esp + 0x94]
mov byte [esp + 0x1e4], 3
call fcn.004033c0
push 0x4f68f0
lea ecx, [esp + 0xb0]
mov byte [esp + 0x1e4], 4
call fcn.004033c0
push str.fireball
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1e4], 5
call fcn.004033c0
push str.fireball3
lea ecx, [esp + 0xe8]
mov byte [esp + 0x1e4], 6
call fcn.004033c0
push str.plasma
lea ecx, [esp + 0x104]
mov byte [esp + 0x1e4], 7
call fcn.004033c0
push str.salute
lea ecx, [esp + 0x120]
mov byte [esp + 0x1e4], 8
call fcn.004033c0
push str.firemagic
lea ecx, [esp + 0x13c]
mov byte [esp + 0x1e4], 9
call fcn.004033c0
push str.icemagic
lea ecx, [esp + 0x158]
mov byte [esp + 0x1e4], 0xa
call fcn.004033c0
push str.greenmagic
lea ecx, [esp + 0x174]
mov byte [esp + 0x1e4], 0xb
call fcn.004033c0
push str.yellowmagic
lea ecx, [esp + 0x190]
mov byte [esp + 0x1e4], 0xc
call fcn.004033c0
push str.rainbowball
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x1e4], 0xd
call fcn.004033c0
push str.hierarchy.Screen.Shop.
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1e4], 0xe
call fcn.004033c0
imul edi, edi, 0x1c
push 0xffffffffffffffff
push 0
lea edx, [esp + edi + 0x60]
push edx
lea ecx, [esp + 0x44]
mov byte [esp + 0x1ec], 0xf
call fcn.00402530
push 0x3f800000
push 0x3f800000
push 0
push 0x3e8
fld dword [ebp + 0xc]
sub esp, 8
fsub dword [0x4f2a18]
mov eax, esp
fld dword [ebp + 8]
mov dword [esp + 0x34], esp
fstp dword [eax]
fstp dword [eax + 4]
call fcn.00416de0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x50], esp
lea edx, [esp + 0x6c]
push edx
push ecx
mov ecx, eax
call fcn.004118f0
mov ecx, esi
call fcn.004928e0
cmp dword [esp + 0x50], ebx
jb 0x49f2aa
mov eax, dword [esp + 0x3c]
push eax
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x1c0], ebx
mov edi, 0xf
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
jb 0x49f2d9
mov ecx, dword [esp + 0x1ac]
push ecx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x1a4], ebx
mov dword [esp + 0x1c0], edi
mov dword [esp + 0x1bc], 0
mov byte [esp + 0x1ac], 0
jb 0x49f30c
mov edx, dword [esp + 0x190]
push edx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x188], ebx
mov dword [esp + 0x1a4], edi
mov dword [esp + 0x1a0], 0
mov byte [esp + 0x190], 0
jb 0x49f33f
mov eax, dword [esp + 0x174]
push eax
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x16c], ebx
mov dword [esp + 0x188], edi
mov dword [esp + 0x184], 0
mov byte [esp + 0x174], 0
jb 0x49f372
mov ecx, dword [esp + 0x158]
push ecx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x150], ebx
mov dword [esp + 0x16c], edi
mov dword [esp + 0x168], 0
mov byte [esp + 0x158], 0
jb 0x49f3a5
mov edx, dword [esp + 0x13c]
push edx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x134], ebx
mov dword [esp + 0x150], edi
mov dword [esp + 0x14c], 0
mov byte [esp + 0x13c], 0
jb 0x49f3d8
mov eax, dword [esp + 0x120]
push eax
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x118], ebx
mov dword [esp + 0x134], edi
mov dword [esp + 0x130], 0
mov byte [esp + 0x120], 0
jb 0x49f40b
mov ecx, dword [esp + 0x104]
push ecx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0xfc], ebx
mov dword [esp + 0x118], edi
mov dword [esp + 0x114], 0
mov byte [esp + 0x104], 0
jb 0x49f43e
mov edx, dword [esp + 0xe8]
push edx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0xe0], ebx
mov dword [esp + 0xfc], edi
mov dword [esp + 0xf8], 0
mov byte [esp + 0xe8], 0
jb 0x49f471
mov eax, dword [esp + 0xcc]
push eax
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0xc4], ebx
mov dword [esp + 0xe0], edi
mov dword [esp + 0xdc], 0
mov byte [esp + 0xcc], 0
jb 0x49f4a4
mov ecx, dword [esp + 0xb0]
push ecx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0xa8], ebx
mov dword [esp + 0xc4], edi
mov dword [esp + 0xc0], 0
mov byte [esp + 0xb0], 0
jb 0x49f4d7
mov edx, dword [esp + 0x94]
push edx
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x8c], ebx
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], 0
mov byte [esp + 0x94], 0
jb 0x49f507
mov eax, dword [esp + 0x78]
push eax
call fcn.004ade5d
add esp, 4
cmp dword [esp + 0x70], ebx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], 0
mov byte [esp + 0x78], 0
mov byte [esp + 0x1e0], 1
jb 0x49f539
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.004ade5d
add esp, 4
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], 0
mov byte [esp + 0x5c], 0
mov al, byte [ebp + 0x29]
test al, al
je 0x49f571
mov ecx, dword [esi + 0x10]
test ecx, ecx
jne 0x49f55c
xor eax, eax
jmp 0x49f564
mov eax, dword [esi + 0x14]
sub eax, ecx
sar eax, 2
mov ecx, dword [esp + 0x14]
dec eax
cmp ecx, eax
jne 0x49f6b9
mov al, byte [esp + 0x13]
test al, al
je 0x49f6b9
cmp dword [esp + 0x14], 1
jl 0x49f5a6
mov eax, dword [esi + 0x10]
mov edx, dword [esp + 0x20]
mov eax, dword [edx + eax - 4]
test eax, eax
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
mov dword [ecx], eax
je 0x49f59f
inc dword [eax + 4]
mov ecx, esi
call fcn.0049abc0
mov eax, dword [esi + 0x318]
test eax, eax
je 0x49f6a7
mov eax, dword [esi + 0x2bc]
mov ecx, dword [eax + 0x28]
mov ecx, dword [ecx*4 + 0x4f731c]
imul ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x2c0]
add dword [eax], ecx
mov al, byte [esi + 0x344]
test al, al
je 0x49f6a7
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
sub eax, ecx
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
push 8
add ebx, ecx
call fcn.004ad909
add esp, 4
test eax, eax
je 0x49f611
mov dword [eax + 4], 0
mov dword [eax], 0x4f6724
mov edi, eax
jmp 0x49f613
xor edi, edi
test edi, edi
mov dword [esp + 0x1c], edi
je 0x49f61e
inc dword [edi + 4]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x4f130c
mov byte [esp + 0x200], 0x10
call fcn.004033c0
mov eax, dword [esi + 0x2bc]
mov edx, dword [eax + 0x28]
mov edx, dword [edx*4 + 0x4f731c]
imul edx, dword [esp + 0x34]
mov eax, dword [esi + 0x10]
push 0
push 0
lea ecx, [ebx*4]
mov ebx, dword [ecx + eax]
push edx
sub esp, 0xc
fld dword [ebx + 0xc]
mov eax, ebx
mov dword [esp + 0x54], esp
mov ecx, edi
fld dword [eax + 8]
mov eax, esp
push 0
mov dword [eax + 8], 0xc4160000
fstp dword [eax]
fstp dword [eax + 4]
call fcn.004ad130
test edi, edi
mov byte [esp + 0x1e0], 1
je 0x49f6a7
mov ecx, dword [edi + 4]
dec ecx
mov eax, ecx
test eax, eax
mov dword [edi + 4], ecx
jne 0x49f6a7
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], 0
mov ebx, 0x10
mov eax, dword [ebp + 4]
dec eax
mov byte [esp + 0x1e0], 0
mov dword [ebp + 4], eax
jne 0x49f6d3
mov edx, dword [ebp]
mov ecx, ebp
push 1
call dword [edx]
mov edx, dword [esp + 0x14]
inc edx
xor edi, edi
jmp 0x49efcf
mov ebp, dword [esi + 0x10]
cmp ebp, dword [esi + 0x14]
mov dword [esp + 0x14], ebp
je 0x49f9f2
lea eax, [ebp + 4]
mov dword [esp + 0x18], eax
jmp 0x49f700
mov ebp, dword [esp + 0x14]
lea esp, [esp]
mov eax, dword [ebp]
mov cl, byte [eax + 0x29]
test cl, cl
je 0x49f719
mov ecx, dword [eax + 0x14]
cmp ecx, dword [esi + 0x1e0]
jge 0x49f719
mov byte [eax + 0x29], 0
mov eax, dword [ebp]
mov cl, byte [eax + 0x29]
test cl, cl
je 0x49f9d3
mov cl, byte [esi + 0x2d4]
test cl, cl
jne 0x49f748
test eax, eax
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
mov dword [ecx], eax
je 0x49f741
inc dword [eax + 4]
mov ecx, esi
call fcn.0048edb0
mov al, byte [esi + 8]
test al, al
jne 0x49f8d3
mov ecx, dword [esi + 0x268]
mov al, byte [esi + 0x2d4]
inc ecx
test al, al
mov dword [esi + 0x268], ecx
jne 0x49f8d3
mov eax, dword [ebp]
cmp dword [eax + 0x30], 1
jne 0x49f891
mov edx, dword [eax + 0x38]
mov ecx, dword [eax + 0x34]
test ecx, ecx
mov dword [esp + 0x40], edx
mov edx, dword [eax + 0x3c]
mov dword [esp + 0x44], edx
jne 0x49f7e6
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x49f891
mov eax, dword [esi + 0x14]
sub eax, ecx
sar eax, 2
test eax, eax
jbe 0x49f891
mov eax, dword [esi + 0x190]
mov ecx, dword [esi + 0x194]
mov dword [esi + 0x290], eax
mov eax, dword [esi + 0x318]
test eax, eax
mov byte [esi + 0x28c], 1
mov dword [esi + 0x294], ecx
je 0x49f891
mov edx, dword [esi + 0x190]
mov dword [eax + 0x3c], edx
jmp 0x49f891
cmp ecx, 1
jne 0x49f825
mov ecx, dword [esi + 0x194]
mov eax, dword [esi + 0x190]
push 0
push 0
mov dword [esi + 0x224], ecx
push 1
mov ecx, esi
mov dword [esi + 0x220], eax
call fcn.00495490
mov eax, dword [esi + 0x318]
test eax, eax
je 0x49f891
mov edx, dword [esi + 0x190]
mov dword [eax + 0x34], edx
jmp 0x49f891
cmp ecx, 2
jne 0x49f854
mov edi, dword [eax + 0x10]
call fcn.0043f0a0
mov byte [eax + 1], 1
call fcn.0043f0a0
mov dword [eax + 4], edi
mov edi, dword [ebp]
call fcn.0043f0a0
mov ecx, dword [edi + 8]
mov dword [eax + 8], ecx
mov edx, dword [edi + 0xc]
mov dword [eax + 0xc], edx
jmp 0x49f891
cmp ecx, 3
jne 0x49f891
mov ecx, dword [esi + 0x194]
mov eax, dword [esi + 0x190]
push 0
push 0
mov dword [esi + 0x24c], ecx
push 1
mov ecx, esi
mov dword [esi + 0x248], eax
call fcn.00490640
mov eax, dword [esi + 0x318]
test eax, eax
je 0x49f891
mov edx, dword [esi + 0x190]
mov dword [eax + 0x38], edx
mov eax, dword [ebp]
mov ecx, dword [eax + 0x30]
cmp ecx, 2
jne 0x49f8d3
mov edx, dword [eax + 0x34]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 0x38]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 0x3c]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x28]
mov dword [esp + 0x30], ecx
push eax
lea ecx, [esi + 0x144]
mov dword [esp + 0x38], edx
call fcn.0047cbd0
mov ecx, dword [ebp]
mov ecx, dword [ecx + 0x2c]
mov edx, dword [ecx]
call dword [edx + 0x10]
mov eax, dword [ebp]
mov ecx, dword [eax + 0x44]
test ecx, ecx
je 0x49f90d
push 1
call fcn.004244f0
mov eax, dword [ebp]
mov ecx, dword [eax + 0x44]
add eax, 0x44
test ecx, ecx
mov dword [eax], 0
je 0x49f90d
dec dword [ecx + 4]
jne 0x49f90d
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [ebp]
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x49f93c
push 1
call fcn.004244f0
mov eax, dword [ebp]
mov ecx, dword [eax + 0x40]
add eax, 0x40
test ecx, ecx
mov dword [eax], 0
je 0x49f93c
dec dword [ecx + 4]
jne 0x49f93c
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x2c]
push 1
call fcn.004244f0
mov ebx, dword [esi + 0x14]
mov edi, dword [esp + 0x18]
cmp edi, ebx
je 0x49f985
mov ebp, dword [esp + 0x14]
mov eax, edi
sub ebp, eax
nop
mov eax, dword [edi]
test eax, eax
je 0x49f969
inc dword [eax + 4]
mov ecx, dword [edi + ebp]
test ecx, ecx
mov dword [edi + ebp], eax
je 0x49f97e
dec dword [ecx + 4]
jne 0x49f97e
mov edx, dword [ecx]
push 1
call dword [edx]
add edi, 4
cmp edi, ebx
jne 0x49f960
mov ebp, dword [esi + 0x14]
lea edi, [ebp - 4]
cmp edi, ebp
je 0x49f9a6
nop
mov eax, dword [edi]
test eax, eax
je 0x49f99f
push eax
call fcn.00401030
add esp, 4
add edi, 4
cmp edi, ebp
jne 0x49f990
add dword [esi + 0x14], 0xfffffffc
mov al, byte [esi + 0x344]
test al, al
jne 0x49f9e5
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x49f9c7
mov eax, dword [esi + 0x14]
sub eax, ecx
sar eax, 2
test eax, eax
jne 0x49f9e5
mov dword [esi + 0x1e8], 0
jmp 0x49f9e5
mov eax, dword [esp + 0x18]
add ebp, 4
add eax, 4
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 0x14]
jne 0x49f6f8
mov ecx, dword [esp + 0x1d8]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x1cc]
xor ecx, dword [esp + 0x1dc]
pop ebp
pop ebx
add esp, 0x1d4
jmp fcn.004ae650