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

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, ecx
push ebp
push esi
push edi
mov ecx, dword [ebx + 0x154]
mov eax, dword [ecx]
call dword [eax + 4]
mov ebp, dword [esp + 0x70]
cmp ebp, eax
jae 0x4fc245
mov eax, dword [ebx + 0x154]
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x78]
add esi, edi
push ebp
mov ecx, dword [eax + 0xec]
mov dword [esp + 0x30], esi
call fcn.0051cbbb
cmp esi, eax
ja 0x4fc245
mov eax, dword [ebx + 0x408]
test eax, eax
je 0x4fbc08
cmp byte [eax + 0x125], 0
mov byte [esp + 0x1c], 1
jne 0x4fbc0d
mov byte [esp + 0x1c], 0
mov ecx, dword [ebx + 0x154]
push ebp
call fcn.004b9ae4
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
je 0x4fbc35
mov ecx, dword [ebx + 0x154]
push ebp
call fcn.004ba5bb
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
call fcn.00473a26
lea ecx, [ebx + 0x250]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x30], edx
xor edx, edx
mov dword [esp + 0x10], eax
mov eax, dword [ecx]
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edx
cmp dword [ebx + 0x260], edx
je 0x4fbfa9
test eax, eax
je 0x4fbc6f
mov eax, dword [eax]
jmp 0x4fbc71
mov eax, edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [esp + 0x10]
mov eax, dword [eax + ecx*4]
cmp dword [eax], ebp
jne 0x4fbcc9
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4fbc8f
mov eax, dword [eax]
jmp 0x4fbc91
mov eax, edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [esp + 0x10]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x74]
cmp dword [eax + 8], ecx
jne 0x4fbcc9
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4fbcb4
mov eax, dword [eax]
jmp 0x4fbcb6
mov eax, edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [esp + 0x10]
mov eax, dword [eax + ecx*4]
cmp dword [eax + 0xc], edi
je 0x4fbceb
mov eax, dword [esp + 0x14]
inc eax
inc dword [esp + 0x10]
mov dword [esp + 0x14], eax
cmp eax, dword [ebx + 0x260]
je 0x4fbfa9
mov eax, dword [esp + 0x20]
jmp 0x4fbc67
mov eax, dword [esp + 0x14]
sub eax, 1
mov dword [esp + 0x28], eax
js 0x4fbd17
mov esi, eax
push esi
lea ecx, [ebx + 0x250]
call fcn.004cf1f8
add dword [eax + 0x10], 0xffffffff
adc dword [eax + 0x14], 0xffffffff
sub esi, 1
jns 0x4fbcfa
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4fbdb3
mov eax, dword [ebx + 0x154]
push ebp
mov ecx, dword [eax + 0xec]
call fcn.0051cbbb
cmp dword [esp + 0x2c], eax
jb 0x4fbdb3
mov eax, dword [esi + 0x34]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4fbd4e
mov edx, dword [eax]
mov dword [esp + 0x78], edx
jmp 0x4fbd56
xor esi, esi
mov edx, esi
mov dword [esp + 0x78], esi
mov eax, dword [ebx + 0x154]
mov edx, dword [edx + 8]
mov ebp, dword [esp + 0x24]
dec edx
and edx, dword [esp + 0x10]
mov ecx, dword [eax + 0xd4]
mov eax, dword [esp + 0x78]
mov esi, dword [ecx]
mov eax, dword [eax + 4]
mov eax, dword [eax + edx*4]
mov edx, dword [esp + 0x2c]
mov eax, dword [eax + 4]
sub ebp, dword [edx + eax*8]
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x30]
sbb ebp, dword [edx + eax*8 + 4]
push ebp
push dword [esp + 0x28]
call dword [esi + 0xd8]
mov eax, dword [ebx + 0x154]
mov ecx, dword [eax + 0xd4]
mov eax, dword [ecx]
call dword [eax + 0xdc]
mov ebp, dword [esp + 0x70]
add dword [ebx + 0x1b8], edi
push 0
pop eax
adc dword [ebx + 0x1bc], eax
cmp byte [esp + 0x1c], al
je 0x4fbdd4
add dword [ebx + 0x1c0], edi
adc dword [ebx + 0x1c4], eax
cmp byte [ebx + 0x201], 2
jne 0x4fbde9
add dword [ebx + 0x1c8], edi
adc dword [ebx + 0x1cc], eax
test dword [0x7ea094], 0x40000000
je 0x4fbe09
push edi
push dword [esp + 0x78]
push ebp
push str.Got_Piece:__d:_d___d
push ebx
call fcn.0050207d
add esp, 0x14
push dword [esp + 0x14]
lea eax, [esp + 0x50]
push eax
lea ecx, [ebx + 0x250]
call fcn.00502328
mov esi, eax
lea edi, [esp + 0x34]
push 6
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x40]
xor edx, edx
sub dword [ebx + 0x400], eax
mov eax, 0x7fff0000
mov ecx, dword [ebx + 0xa0]
add ecx, 0x400
div ecx
mov ecx, eax
mov eax, dword [ebx + 0x150]
test byte [eax + 0xd1], 1
je 0x4fbe5a
add ecx, ecx
mov edi, dword [esp + 0x14]
mov eax, ecx
shl eax, 2
xor esi, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x74], eax
cmp edi, dword [ebx + 0x260]
jae 0x4fbed7
mov ebp, eax
mov eax, ebp
lea ecx, [ebx + 0x250]
shr eax, 0x10
add eax, dword [0x7e67e0]
push edi
mov dword [esp + 0x7c], eax
call fcn.004cf1f8
mov ecx, dword [eax + 0x10]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x74], ecx
cmp ecx, eax
ja 0x4fbea5
mov dword [esp + 0x74], eax
push edi
lea ecx, [ebx + 0x250]
call fcn.004cf1f8
mov ecx, dword [esp + 0x74]
add ebp, dword [esp + 0x30]
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], esi
mov eax, 0x3c0000
cmp ebp, eax
jb 0x4fbeca
mov ebp, eax
inc edi
cmp edi, dword [ebx + 0x260]
jb 0x4fbe77
mov ebp, dword [esp + 0x70]
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4fbef1
mov ecx, dword [ebx + 0x154]
push ebp
call fcn.004ba5bb
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], edx
push dword [esp + 0x1c]
mov ecx, dword [ebx + 0x154]
lea eax, [esp + 0x38]
push dword [ebx + 0x150]
push dword [esp + 0x84]
push eax
call fcn.004bca5a
cmp byte [ebx + 0x18], 5
je 0x4fc26b
mov ecx, dword [ebx + 0x154]
call fcn.004c525b
test byte [ebx + 0x190], 0x20
je 0x4fbf60
mov edi, dword [0x7e67e0]
sub edi, dword [ebx + 0x210]
mov ecx, dword [0x7e67e4]
mov eax, dword [0x7c0cf0]
sbb ecx, dword [ebx + 0x214]
cdq
cmp ecx, edx
jg 0x4fbf60
jl 0x4fbf58
cmp edi, eax
jae 0x4fbf60
push esi
mov ecx, ebx
call fcn.0050106c
mov ecx, ebx
call fcn.004febba
xor eax, eax
cmp dword [ebx + 0x260], eax
je 0x4fbf7e
mov eax, dword [0x7e67e0]
mov ecx, dword [0x7e67e4]
jmp 0x4fbf80
mov ecx, eax
mov dword [ebx + 0x210], eax
mov dword [ebx + 0x214], ecx
mov ecx, dword [0x7e67e0]
mov edx, dword [0x7e67e4]
mov dword [ebx + 0x328], ecx
mov dword [ebx + 0x32c], edx
jmp 0x4fc26b
test byte [ebx + 0x178], 0x10
je 0x4fc0a1
lea ecx, [ebx + 0x290]
mov dword [esp + 0x20], edx
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [ecx]
mov dword [esp + 0x24], eax
cmp dword [ebx + 0x2a0], edx
je 0x4fc0a1
test eax, eax
je 0x4fbfe1
mov eax, dword [eax]
jmp 0x4fbfe3
mov eax, edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [esp + 0x14]
mov eax, dword [eax + ecx*4]
cmp dword [eax], ebp
jne 0x4fc03b
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4fc001
mov eax, dword [eax]
jmp 0x4fc003
mov eax, edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [esp + 0x14]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x74]
cmp dword [eax + 8], ecx
jne 0x4fc03b
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4fc026
mov eax, dword [eax]
jmp 0x4fc028
mov eax, edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [esp + 0x14]
mov eax, dword [eax + ecx*4]
cmp dword [eax + 0xc], edi
je 0x4fc056
mov ecx, dword [esp + 0x20]
inc ecx
inc dword [esp + 0x14]
mov dword [esp + 0x20], ecx
cmp ecx, dword [ebx + 0x2a0]
je 0x4fc0a1
mov eax, dword [esp + 0x24]
jmp 0x4fbfd9
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x4c]
push ecx
push eax
lea ecx, [ebx + 0x290]
call fcn.00502328
push 6
pop ecx
mov esi, eax
lea edi, [esp + 0x34]
push 1
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x154]
lea eax, [esp + 0x38]
push 1
push eax
call fcn.004b2600
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x78]
movzx eax, al
neg eax
sbb eax, eax
not eax
and esi, eax
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x74]
test eax, 0x3fff
jne 0x4fc1fe
test esi, esi
je 0x4fc1fe
mov ebp, eax
shr ebp, 0xe
cmp ebp, dword [esi + 0xc]
jae 0x4fc1fa
mov ecx, dword [ebx + 0x154]
push ebp
push dword [esp + 0x74]
call fcn.004b953b
cmp eax, edi
jne 0x4fc1fa
mov eax, dword [esi + 0x50]
mov dword [esp + 0x24], eax
mov dl, byte [eax + ebp]
test dl, 0x10
je 0x4fc1fa
mov eax, dword [esi + 0x30]
xor ecx, ecx
cmp dword [eax + ebp*4], ecx
jne 0x4fc1fa
test dl, 1
jne 0x4fc14b
sub dword [esi + 0x10], 1
jne 0x4fc141
mov edi, dword [ebx + 0x154]
mov edx, dword [esi + 8]
mov esi, edx
shr esi, 3
and edx, 7
mov ecx, dword [edi + 0x124]
movzx eax, byte [esi + ecx]
btr eax, edx
mov byte [esi + ecx], al
or byte [edi + 0x157], 2
xor ecx, ecx
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 0x50]
mov edi, dword [esp + 0x78]
jmp 0x4fc145
mov eax, dword [esp + 0x24]
or byte [eax + ebp], 1
jmp 0x4fc155
mov eax, dword [esp + 0x24]
or dl, 2
mov byte [eax + ebp], dl
mov eax, dword [esp + 0x70]
mov dword [esp + 0x38], ebp
shl ebp, 0xe
add dword [ebx + 0x1b8], edi
mov dword [esp + 0x34], eax
adc dword [ebx + 0x1bc], ecx
cmp byte [esp + 0x1c], 0
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
je 0x4fc193
add dword [ebx + 0x1c0], edi
adc dword [ebx + 0x1c4], ecx
cmp byte [ebx + 0x201], 2
jne 0x4fc1a8
add dword [ebx + 0x1c8], edi
adc dword [ebx + 0x1cc], ecx
test dword [0x7ea094], 0x40000000
je 0x4fc1c8
push edi
push dword [esp + 0x78]
push eax
push str.Got_OLD_Piece:__d:_d___d
push ebx
call fcn.0050207d
add esp, 0x14
push dword [esp + 0x1c]
mov ecx, dword [ebx + 0x154]
lea eax, [esp + 0x38]
push dword [ebx + 0x150]
push dword [esp + 0x84]
push eax
call fcn.004bca5a
mov ecx, dword [ebx + 0x154]
test ecx, ecx
je 0x4fc26b
call fcn.004c525b
jmp 0x4fc26b
mov ebp, dword [esp + 0x70]
push dword [ebx + 0x150]
mov ecx, dword [ebx + 0x154]
push ebp
push edi
call fcn.004b1fde
mov esi, dword [ebx + 0x42c]
sub esi, edi
jns 0x4fc21d
xor esi, esi
mov dword [ebx + 0x42c], esi
test dword [0x7ea094], 0x1000
je 0x4fc26b
push edi
push dword [esp + 0x78]
push ebp
push str.Got_Piece_Unrequested:__d:_d___d
push ebx
call fcn.0050207d
add esp, 0x14
jmp 0x4fc26b
mov ecx, dword [ebx + 0x154]
mov eax, dword [ecx]
call dword [eax + 0x15c]
test al, al
jns 0x4fc26b
mov ecx, dword [ebx + 0x154]
push 0xffffffffffffffff
push ebp
push dword [ebx + 0x150]
call fcn.004b0de2
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x5c
ret 0x10