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

Disassembly:
push 0xffffffffffffffff
push 0x52e28d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe4
push ebx
push ebp
push esi
mov esi, dword [esp + 0x11c]
mov ebx, ecx
push edi
mov eax, dword [esi + 4]
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x24], ebx
mov ecx, dword [eax]
mov eax, dword [esi + 8]
test eax, eax
mov dword [esp + 0x10], ecx
jle 0x4f6b88
mov edx, dword [esi + 4]
mov ecx, dword [edx + edi*4]
call fcn.00502900
test eax, eax
je 0x4f6b5a
mov eax, dword [esi + 4]
inc ebp
mov ecx, dword [eax + edi*4]
mov dword [esp + 0x10], ecx
mov eax, dword [esi + 8]
inc edi
cmp edi, eax
jl 0x4f6b40
cmp ebp, 1
jle 0x4f6b88
push 1
push 0
push 0
push 0
push str.Can_select_only_one_piece
push 0x55abe8
call fcn.0043e3d0
add esp, 0x18
xor eax, eax
jmp 0x4f7281
lea ecx, [esp + 0xa4]
call fcn.00487f90
xor edi, edi
mov dword [esp + 0x30], 0x534048
mov dword [esp + 0xfc], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], edi
lea ecx, [esp + 0xc4]
mov byte [esp + 0xfc], 1
call fcn.00487f90
mov eax, dword [esi + 8]
mov byte [esp + 0xfc], 2
cmp eax, 1
jne 0x4f6c43
mov eax, dword [esp + 0x38]
mov edx, dword [esi + 4]
mov ebp, eax
inc eax
mov edi, dword [edx]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x38]
call fcn.004ecdd0
mov eax, dword [esp + 0x34]
mov dword [eax + ebp*4], edi
mov ecx, dword [esi + 4]
mov ecx, dword [ecx]
call fcn.00498b90
push eax
lea ecx, [esp + 0xc8]
call fcn.00488080
lea edx, [esp + 0xc4]
lea ecx, [esp + 0xa4]
push edx
call fcn.00488080
push 0x40099999
lea eax, [esp + 0xa8]
push 0x9999999a
push eax
mov ecx, ebx
call fcn.004fc030
xor edi, edi
jmp 0x4f6cef
cmp eax, edi
jle 0x4f6c8d
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + edi*4]
call fcn.00498b90
push eax
lea ecx, [esp + 0xc8]
call fcn.004880c0
mov eax, dword [esp + 0x38]
mov edx, dword [esi + 4]
mov ebx, eax
inc eax
mov ebp, dword [edx + edi*4]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x38]
call fcn.004ecdd0
mov eax, dword [esp + 0x34]
inc edi
mov dword [eax + ebx*4], ebp
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x4f6c47
mov ebx, dword [esp + 0x24]
xor edi, edi
lea ecx, [esp + 0xc4]
push ecx
lea ecx, [esp + 0xa8]
call fcn.00488080
mov eax, dword [esi + 8]
cmp eax, 0xe
jle 0x4f6cbd
push 0x3ff4cccc
lea edx, [esp + 0xa8]
push 0xcccccccd
push edx
jmp 0x4f6ce8
cmp eax, 4
jle 0x4f6cd6
push 0x3ffccccc
lea eax, [esp + 0xa8]
push 0xcccccccd
push eax
jmp 0x4f6ce8
push 0x40059999
lea ecx, [esp + 0xa8]
push 0x9999999a
push ecx
mov ecx, ebx
call fcn.004fc030
push esi
mov ecx, ebx
call fcn.004f38d0
lea edx, [esp + 0xa4]
lea ecx, [ebx + 0xb78]
push edx
call fcn.00498b90
push eax
call fcn.00487eb0
add esp, 8
lea ecx, [esp + 0xa4]
call fcn.00488350
fstp qword [esp + 0x24]
lea ecx, [esp + 0xc4]
call fcn.00488350
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x4f6dc0
lea ecx, [esp + 0xa4]
call fcn.00488370
fstp qword [esp + 0x24]
lea ecx, [esp + 0xc4]
call fcn.00488370
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x4f6dc0
lea ecx, [esp + 0xc4]
mov byte [esp + 0xfc], 1
call fcn.00519440
mov dword [esp + 0x30], 0x534048
mov eax, dword [esp + 0x34]
mov byte [esp + 0xfc], 3
cmp eax, edi
je 0x4f6d9a
push eax
call fcn.0051aee4
add esp, 4
lea ecx, [esp + 0xa4]
mov dword [esp + 0x30], 0x53138c
mov dword [esp + 0xfc], 0xffffffff
call fcn.00519440
xor eax, eax
jmp 0x4f7281
mov dword [esp + 0x80], 0x534048
mov dword [esp + 0x84], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], edi
lea eax, [esp + 0x80]
lea ecx, [esp + 0xa4]
push eax
push ecx
mov ecx, ebx
mov byte [esp + 0x104], 4
call fcn.004f6340
mov eax, 0x533ea4
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], edi
mov ebp, dword [esp + 0x10]
lea edx, [esp + 0x58]
lea eax, [esp + 0x44]
push edx
push eax
push ebp
mov ecx, ebx
mov byte [esp + 0x108], 6
call fcn.004fa6a0
mov ecx, dword [esp + 0x108]
or eax, 0xffffffff
cmp ecx, eax
jne 0x4f6eb6
cmp dword [esp + 0x10c], eax
jne 0x4f6eb6
mov ecx, ebp
call fcn.00502900
test al, 1
jne 0x4f6e7c
mov dword [esp + 0x108], edi
jmp 0x4f6e8f
mov edx, dword [esp + 0x4c]
xor ecx, ecx
cmp edx, edi
setle cl
inc ecx
mov dword [esp + 0x108], ecx
mov ecx, ebp
call fcn.00502900
test al, 2
jne 0x4f6ea3
mov dword [esp + 0x10c], edi
jmp 0x4f6eb6
mov ecx, dword [esp + 0x60]
xor edx, edx
cmp ecx, edi
setle dl
inc edx
mov dword [esp + 0x10c], edx
lea esi, [ebx + 0xb8]
mov ecx, esi
call fcn.004ec980
mov edx, dword [eax]
lea ecx, [esp + 0x94]
push ecx
mov ecx, eax
call dword [edx + 0x1c]
mov ecx, dword [esp + 0x108]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x6c], 2
jne 0x4f6f69
cmp dword [esp + 0x10c], eax
jne 0x4f6f69
mov ecx, esi
call fcn.00507ac0
cmp eax, 3
jle 0x4f6f69
lea edx, [esp + 0x58]
lea eax, [esp + 0x44]
push edx
push eax
push ebp
mov ecx, ebx
call fcn.004f69b0
cmp eax, edi
je 0x4f6f69
lea ecx, [esp + 0xe4]
push eax
push ecx
mov ecx, ebx
call fcn.004fa860
mov edx, dword [eax]
mov dword [esp + 0x14], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x18], ecx
mov edx, dword [eax + 8]
mov dword [esp + 0x1c], edx
mov eax, dword [eax + 0xc]
mov dword [esp + 0x20], eax
jmp 0x4f7078
mov eax, dword [esp + 0x108]
sub eax, edi
je 0x4f6fee
dec eax
je 0x4f6f92
dec eax
jne 0x4f6ff2
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x98]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
jmp 0x4f6ff2
mov esi, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov eax, 1
mov ecx, dword [esi]
cmp edx, eax
mov dword [esp + 0x2c], ecx
jle 0x4f6fcf
lea ecx, [esi + 4]
mov ebp, dword [ecx]
cmp dword [ebp + 0x254], edi
jne 0x4f6fc8
inc eax
add ecx, 4
cmp eax, edx
jl 0x4f6fac
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
jmp 0x4f6fcf
mov ecx, dword [esi + eax*4]
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0xe4]
push ecx
push eax
mov ecx, ebx
call fcn.004fa860
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
jmp 0x4f6ff2
mov dword [esp + 0x24], edi
mov eax, dword [esp + 0x10c]
sub eax, edi
je 0x4f7074
dec eax
je 0x4f701b
dec eax
jne 0x4f7078
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jmp 0x4f7078
mov esi, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
mov eax, 1
mov ecx, dword [esi]
cmp edx, eax
mov dword [esp + 0x2c], ecx
jle 0x4f7054
lea ecx, [esi + 4]
mov ebp, dword [ecx]
cmp dword [ebp + 0x254], edi
jne 0x4f704d
inc eax
add ecx, 4
cmp eax, edx
jl 0x4f7035
mov ecx, dword [esp + 0x2c]
jmp 0x4f7050
mov ecx, dword [esi + eax*4]
mov ebp, dword [esp + 0x10]
lea edx, [esp + 0xe4]
push ecx
push edx
mov ecx, ebx
call fcn.004fa860
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jmp 0x4f7078
mov dword [esp + 0x6c], edi
lea eax, [esp + 0x70]
mov ecx, ebp
push eax
call fcn.00502870
lea ecx, [esp + 0x14]
push ecx
push ebp
mov ecx, ebx
call fcn.004fa8d0
fld qword [esp + 0x70]
fsub qword [esp + 0x14]
mov ecx, dword [esp + 0x108]
mov eax, 4
cmp ecx, eax
fstp qword [esp + 0x70]
fld qword [esp + 0x78]
fsub qword [esp + 0x1c]
fstp qword [esp + 0x78]
jne 0x4f70cb
fld qword [esp + 0x110]
fadd qword [esp + 0x94]
fstp qword [esp + 0x70]
cmp dword [esp + 0x10c], eax
jne 0x4f70e6
fld qword [esp + 0x118]
fadd qword [esp + 0x9c]
fstp qword [esp + 0x78]
mov ecx, ebp
call fcn.00502900
mov edx, dword [esp + 0x24]
mov esi, eax
mov eax, dword [esp + 0x6c]
lea ecx, [esp + 0x30]
or eax, edx
mov edx, dword [esp + 0x124]
and esi, eax
lea eax, [esp + 0x80]
push edx
push eax
lea edx, [esp + 0xac]
push ecx
push edx
mov ecx, ebp
call fcn.00498b90
mov ecx, dword [esp + 0x80]
push eax
mov edx, dword [esp + 0x88]
sub esp, 0x10
mov eax, esp
push esi
mov dword [eax], ecx
mov ecx, dword [esp + 0xa0]
mov dword [eax + 4], edx
mov edx, dword [esp + 0xa4]
mov dword [eax + 8], ecx
mov ecx, ebx
mov dword [eax + 0xc], edx
call fcn.004f98b0
mov ebx, eax
cmp ebx, edi
je 0x4f71b8
mov ecx, dword [esp + 0x4c]
xor eax, eax
cmp ecx, edi
jle 0x4f717d
mov ecx, dword [esp + 0x48]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov dword [edx + 0x254], edi
mov ecx, dword [esp + 0x4c]
cmp eax, ecx
jl 0x4f7164
cmp ecx, edi
je 0x4f7189
mov dword [ebp + 0x254], 1
mov ecx, dword [esp + 0x60]
xor eax, eax
cmp ecx, edi
jle 0x4f71ac
mov ecx, dword [esp + 0x5c]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov dword [edx + 0x254], edi
mov ecx, dword [esp + 0x60]
cmp eax, ecx
jl 0x4f7193
cmp ecx, edi
je 0x4f71b8
mov dword [ebp + 0x254], 1
mov ebp, 0x533ea4
mov dword [esp + 0x58], ebp
mov eax, dword [esp + 0x5c]
mov byte [esp + 0xfc], 7
cmp eax, edi
je 0x4f71da
push eax
call fcn.0051aee4
add esp, 4
mov esi, 0x53138c
mov dword [esp + 0x44], ebp
mov dword [esp + 0x58], esi
mov eax, dword [esp + 0x48]
mov byte [esp + 0xfc], 8
cmp eax, edi
je 0x4f7200
push eax
call fcn.0051aee4
add esp, 4
mov ebp, 0x534048
mov dword [esp + 0x44], esi
mov dword [esp + 0x80], ebp
mov eax, dword [esp + 0x84]
mov byte [esp + 0xfc], 9
cmp eax, edi
je 0x4f722c
push eax
call fcn.0051aee4
add esp, 4
lea ecx, [esp + 0xc4]
mov dword [esp + 0x80], esi
mov byte [esp + 0xfc], 1
call fcn.00519440
mov dword [esp + 0x30], ebp
mov eax, dword [esp + 0x34]
mov byte [esp + 0xfc], 0xa
cmp eax, edi
je 0x4f7264
push eax
call fcn.0051aee4
add esp, 4
lea ecx, [esp + 0xa4]
mov dword [esp + 0x30], esi
mov dword [esp + 0xfc], 0xffffffff
call fcn.00519440
mov eax, ebx
mov ecx, dword [esp + 0xf4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xf0
ret 0x24