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

Disassembly:
push 0xffffffffffffffff
push 0x51d5ad
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 dword [esp + 0x20], ecx
push edi
mov eax, dword [esi + 4]
xor ebp, ebp
xor ebx, ebx
xor edi, edi
mov ecx, dword [eax]
mov eax, dword [esi + 8]
cmp eax, ebp
mov dword [esp + 0x10], ecx
jle 0x4e7d15
mov edx, dword [esi + 4]
mov ecx, dword [edx + edi*4]
call fcn.004f1b60
test eax, eax
je 0x4e7cea
mov eax, dword [esi + 4]
inc ebx
mov ecx, dword [eax + edi*4]
mov dword [esp + 0x10], ecx
mov eax, dword [esi + 8]
inc edi
cmp edi, eax
jl 0x4e7cd0
cmp ebx, 1
jle 0x4e7d15
push 1
push ebp
push ebp
push ebp
push str.Can_select_only_one_piece
push 0x547be8
call fcn.00439540
add esp, 0x18
xor eax, eax
jmp 0x4e83e5
lea ecx, [esp + 0xa4]
call fcn.0047dc50
mov dword [esp + 0xfc], ebp
mov dword [esp + 0x30], 0x522d18
mov dword [esp + 0x34], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ebp
lea ecx, [esp + 0xc4]
mov byte [esp + 0xfc], 1
call fcn.0047dc50
mov eax, dword [esi + 8]
mov byte [esp + 0xfc], 2
cmp eax, 1
jne 0x4e7db8
mov eax, dword [esp + 0x38]
mov edx, dword [esi + 4]
mov ebx, eax
inc eax
mov edi, dword [edx]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x38]
call fcn.004de680
mov eax, dword [esp + 0x34]
mov dword [eax + ebx*4], edi
mov ecx, dword [esi + 4]
mov ecx, dword [ecx]
call fcn.0048e7d0
push eax
lea ecx, [esp + 0xc8]
call fcn.0047dd40
lea edx, [esp + 0xc4]
lea ecx, [esp + 0xa4]
push edx
call fcn.0047dd40
push 0x40099999
jmp 0x4e7e3e
xor edi, edi
cmp eax, ebp
jle 0x4e7e00
mov eax, dword [esi + 4]
mov ecx, dword [eax + edi*4]
call fcn.0048e7d0
push eax
lea ecx, [esp + 0xc8]
call fcn.0047dd80
mov eax, dword [esp + 0x38]
mov ecx, dword [esi + 4]
mov ebx, eax
inc eax
mov ebp, dword [ecx + edi*4]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x38]
call fcn.004de680
mov edx, dword [esp + 0x34]
inc edi
mov dword [edx + ebx*4], ebp
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x4e7dbe
xor ebp, ebp
lea eax, [esp + 0xc4]
lea ecx, [esp + 0xa4]
push eax
call fcn.0047dd40
mov eax, dword [esi + 8]
cmp eax, 0xe
jle 0x4e7e28
push 0x3ff4cccc
push 0xcccccccd
jmp 0x4e7e43
cmp eax, 4
jle 0x4e7e39
push 0x3ffccccc
push 0xcccccccd
jmp 0x4e7e43
push 0x40059999
push 0x9999999a
lea ecx, [esp + 0xac]
call fcn.0047ddf0
mov edi, dword [esp + 0x24]
push esi
mov ecx, edi
call fcn.004e4ff0
lea ecx, [esp + 0xa4]
push ecx
lea ecx, [edi + 0xb78]
call fcn.0048e7d0
push eax
call fcn.0047db70
add esp, 8
lea ecx, [esp + 0xa4]
call fcn.0047e010
fstp qword [esp + 0x24]
lea ecx, [esp + 0xc4]
call fcn.0047e010
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x4e7f24
lea ecx, [esp + 0xa4]
call fcn.0047e030
fstp qword [esp + 0x24]
lea ecx, [esp + 0xc4]
call fcn.0047e030
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x4e7f24
lea ecx, [esp + 0xc4]
mov byte [esp + 0xfc], 1
call fcn.00507a00
mov dword [esp + 0x30], 0x522d18
mov eax, dword [esp + 0x34]
mov byte [esp + 0xfc], 3
cmp eax, ebp
je 0x4e7efe
push eax
call fcn.0050b204
add esp, 4
lea ecx, [esp + 0xa4]
mov dword [esp + 0x30], 0x520384
mov dword [esp + 0xfc], 0xffffffff
call fcn.00507a00
xor eax, eax
jmp 0x4e83e5
mov dword [esp + 0x80], 0x522d18
mov dword [esp + 0x84], ebp
mov dword [esp + 0x90], ebp
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x88], ebp
lea edx, [esp + 0x80]
lea eax, [esp + 0xa4]
push edx
push eax
mov ecx, edi
mov byte [esp + 0x104], 4
call fcn.004e74a0
mov eax, 0x522c30
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], eax
mov dword [esp + 0x54], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x60], ebp
mov ebx, dword [esp + 0x10]
lea ecx, [esp + 0x58]
lea edx, [esp + 0x44]
push ecx
push edx
push ebx
mov ecx, edi
mov byte [esp + 0x108], 6
call fcn.004eb250
mov ecx, dword [esp + 0x108]
or eax, 0xffffffff
cmp ecx, eax
jne 0x4e801a
cmp dword [esp + 0x10c], eax
jne 0x4e801a
mov ecx, ebx
call fcn.004f1b60
test al, 1
jne 0x4e7fe0
mov dword [esp + 0x108], ebp
jmp 0x4e7ff3
mov edx, dword [esp + 0x4c]
xor eax, eax
cmp edx, ebp
setle al
inc eax
mov dword [esp + 0x108], eax
mov ecx, ebx
call fcn.004f1b60
test al, 2
jne 0x4e8007
mov dword [esp + 0x10c], ebp
jmp 0x4e801a
mov edx, dword [esp + 0x60]
xor ecx, ecx
cmp edx, ebp
setle cl
inc ecx
mov dword [esp + 0x10c], ecx
lea esi, [edi + 0xb8]
mov ecx, esi
call fcn.004de230
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 0x4e80cd
cmp dword [esp + 0x10c], eax
jne 0x4e80cd
mov ecx, esi
call fcn.004f63a0
cmp eax, 3
jle 0x4e80cd
lea edx, [esp + 0x58]
lea eax, [esp + 0x44]
push edx
push eax
push ebx
mov ecx, edi
call fcn.004e7b40
cmp eax, ebp
je 0x4e80cd
lea ecx, [esp + 0xe4]
push eax
push ecx
mov ecx, edi
call fcn.004eb410
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 0x4e81dc
mov eax, dword [esp + 0x108]
sub eax, ebp
je 0x4e814e
dec eax
je 0x4e80f6
dec eax
jne 0x4e8152
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x98]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
jmp 0x4e8152
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 0x4e812f
lea ecx, [esi + 4]
mov ebx, dword [ecx]
cmp dword [ebx + 0x254], ebp
jne 0x4e8128
inc eax
add ecx, 4
cmp eax, edx
jl 0x4e8110
mov ecx, dword [esp + 0x2c]
jmp 0x4e812b
mov ecx, dword [esi + eax*4]
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0xe4]
push ecx
push eax
mov ecx, edi
call fcn.004eb410
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
jmp 0x4e8152
mov dword [esp + 0x24], ebp
mov eax, dword [esp + 0x10c]
sub eax, ebp
je 0x4e81d8
dec eax
je 0x4e817b
dec eax
jne 0x4e81dc
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jmp 0x4e81dc
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 0x4e81b8
lea ecx, [esi + 4]
mov ebx, dword [ecx]
cmp dword [ebx + 0x254], ebp
jne 0x4e81b1
inc eax
add ecx, 4
cmp eax, edx
jl 0x4e8195
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
jmp 0x4e81b8
mov ecx, dword [esi + eax*4]
mov ebx, dword [esp + 0x10]
lea edx, [esp + 0xe4]
push ecx
push edx
mov ecx, edi
call fcn.004eb410
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jmp 0x4e81dc
mov dword [esp + 0x6c], ebp
lea eax, [esp + 0x70]
mov ecx, ebx
push eax
call fcn.004f1ad0
lea ecx, [esp + 0x14]
push ecx
push ebx
mov ecx, edi
call fcn.004eb480
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 0x4e822f
fld qword [esp + 0x110]
fadd qword [esp + 0x94]
fstp qword [esp + 0x70]
cmp dword [esp + 0x10c], eax
jne 0x4e824a
fld qword [esp + 0x118]
fadd qword [esp + 0x9c]
fstp qword [esp + 0x78]
mov ecx, ebx
call fcn.004f1b60
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, ebx
call fcn.0048e7d0
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, edi
mov dword [eax + 0xc], edx
call fcn.004ea460
mov edi, eax
cmp edi, ebp
je 0x4e831c
mov ecx, dword [esp + 0x4c]
xor eax, eax
cmp ecx, ebp
jle 0x4e82e1
mov ecx, dword [esp + 0x48]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov dword [edx + 0x254], ebp
mov ecx, dword [esp + 0x4c]
cmp eax, ecx
jl 0x4e82c8
cmp ecx, ebp
je 0x4e82ed
mov dword [ebx + 0x254], 1
mov ecx, dword [esp + 0x60]
xor eax, eax
cmp ecx, ebp
jle 0x4e8310
mov ecx, dword [esp + 0x5c]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov dword [edx + 0x254], ebp
mov ecx, dword [esp + 0x60]
cmp eax, ecx
jl 0x4e82f7
cmp ecx, ebp
je 0x4e831c
mov dword [ebx + 0x254], 1
mov ebx, 0x522c30
mov dword [esp + 0x58], ebx
mov eax, dword [esp + 0x5c]
mov byte [esp + 0xfc], 7
cmp eax, ebp
je 0x4e833e
push eax
call fcn.0050b204
add esp, 4
mov esi, 0x520384
mov dword [esp + 0x44], ebx
mov dword [esp + 0x58], esi
mov eax, dword [esp + 0x48]
mov byte [esp + 0xfc], 8
cmp eax, ebp
je 0x4e8364
push eax
call fcn.0050b204
add esp, 4
mov ebx, 0x522d18
mov dword [esp + 0x44], esi
mov dword [esp + 0x80], ebx
mov eax, dword [esp + 0x84]
mov byte [esp + 0xfc], 9
cmp eax, ebp
je 0x4e8390
push eax
call fcn.0050b204
add esp, 4
lea ecx, [esp + 0xc4]
mov dword [esp + 0x80], esi
mov byte [esp + 0xfc], 1
call fcn.00507a00
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x34]
mov byte [esp + 0xfc], 0xa
cmp eax, ebp
je 0x4e83c8
push eax
call fcn.0050b204
add esp, 4
lea ecx, [esp + 0xa4]
mov dword [esp + 0x30], esi
mov dword [esp + 0xfc], 0xffffffff
call fcn.00507a00
mov eax, edi
mov ecx, dword [esp + 0xf4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xf0
ret 0x24