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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x570018
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
mov ebx, dword [esp + 0x68]
push ebp
push edi
mov ebp, ecx
push ebx
call fcn.0051afa0
test eax, eax
jne 0x51a68f
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
add esp, 0x60
ret 8
mov edi, dword [esp + 0x74]
mov ecx, ebp
push edi
call fcn.0051afa0
test eax, eax
jne 0x51a6b3
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
add esp, 0x60
ret 8
cmp ebx, edi
jne 0x51a6d0
pop edi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
add esp, 0x60
ret 8
mov eax, dword [ebp + 0x90]
push esi
mov esi, ebx
shl esi, 4
mov dword [esp + 0x10], esi
add esi, eax
mov ecx, esi
mov al, byte [esi]
mov byte [esp + 0x34], al
call fcn.00521400
test eax, eax
jge 0x51a6f5
xor eax, eax
lea ecx, [eax*4]
push ecx
call fcn.005603e2
add esp, 4
mov dword [esp + 0x38], eax
mov ecx, dword [esi + 8]
mov esi, dword [esi + 4]
push eax
push ecx
push esi
lea ecx, [esp + 0x40]
call fcn.005218b0
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0x90]
mov esi, edi
shl esi, 4
mov dword [esp + 0x74], esi
add esi, eax
mov ecx, esi
mov dword [esp + 0x6c], 0
mov dl, byte [esi]
mov byte [esp + 0x14], dl
call fcn.00521400
test eax, eax
jge 0x51a74f
xor eax, eax
shl eax, 2
push eax
call fcn.005603e2
add esp, 4
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 8]
mov esi, dword [esi + 4]
push eax
push ecx
push esi
lea ecx, [esp + 0x20]
call fcn.005218b0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x70]
mov byte [esp + 0x6c], 1
mov esi, eax
imul eax, edi
imul esi, ebx
add eax, 2
add esi, 2
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x38]
xor ebx, ebx
test eax, eax
je 0x51a7ed
mov ecx, dword [esp + 0x3c]
sub ecx, eax
sar ecx, 2
cmp ebx, ecx
jae 0x51a7ed
mov edx, dword [eax + ebx*4]
mov ecx, dword [ebp + 0x40]
mov edi, dword [ecx + edx*4]
test edi, edi
je 0x51a7ea
lea edx, [esp + 0x44]
mov ecx, edi
push edx
call fcn.00520700
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
sub eax, edx
mov edx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x48]
sub ecx, eax
push ecx
push edx
push eax
mov ecx, edi
call fcn.005207d0
mov eax, dword [esp + 0x38]
inc ebx
jmp 0x51a799
mov eax, dword [esp + 0x18]
xor ebx, ebx
test eax, eax
je 0x51a843
mov ecx, dword [esp + 0x1c]
sub ecx, eax
sar ecx, 2
cmp ebx, ecx
jae 0x51a843
mov edx, dword [eax + ebx*4]
mov ecx, dword [ebp + 0x40]
mov edi, dword [ecx + edx*4]
test edi, edi
je 0x51a840
lea edx, [esp + 0x54]
mov ecx, edi
push edx
call fcn.00520700
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
sub eax, edx
push eax
mov eax, dword [esp + 0x58]
sub ecx, eax
push ecx
push esi
push eax
mov ecx, edi
call fcn.005207d0
mov eax, dword [esp + 0x18]
inc ebx
jmp 0x51a7f3
mov esi, dword [ebp + 0x90]
mov ebx, dword [esp + 0x10]
mov dl, byte [ebx + esi]
lea edi, [ebx + esi + 4]
mov byte [esp + 0x24], dl
mov ecx, dword [edi]
test ecx, ecx
jne 0x51a862
xor eax, eax
jmp 0x51a86b
mov eax, dword [ebx + esi + 8]
sub eax, ecx
sar eax, 2
test eax, eax
jge 0x51a871
xor eax, eax
shl eax, 2
push eax
call fcn.005603e2
add esp, 4
mov dword [esp + 0x28], eax
mov esi, dword [ebx + esi + 8]
mov ecx, dword [edi]
push eax
push esi
push ecx
lea ecx, [esp + 0x30]
call fcn.005218b0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x90]
mov ecx, dword [esp + 0x74]
mov byte [esp + 0x6c], 2
lea edi, [ecx + eax]
lea esi, [ebx + eax]
cmp esi, edi
je 0x51a9b0
mov eax, dword [edi + 4]
test eax, eax
jne 0x51a8c3
xor ebx, ebx
jmp 0x51a8cb
mov ebx, dword [edi + 8]
sub ebx, eax
sar ebx, 2
mov ecx, esi
call fcn.00521400
cmp ebx, eax
ja 0x51a90b
mov edx, dword [esi + 4]
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push edx
push eax
push ecx
call fcn.00521ba0
mov ecx, dword [esi + 8]
add esp, 0xc
push ecx
push eax
mov ecx, esi
call fcn.004d55a0
mov ecx, edi
call fcn.00521400
mov edx, dword [esi + 4]
lea eax, [edx + eax*4]
mov dword [esi + 8], eax
jmp 0x51a9b0
mov ecx, edi
call fcn.00521400
mov ecx, esi
mov ebx, eax
call fcn.00521850
cmp ebx, eax
ja 0x51a95f
mov ebx, dword [edi + 4]
mov ecx, esi
call fcn.00521400
mov ecx, dword [esi + 4]
lea ebx, [ebx + eax*4]
mov eax, dword [edi + 4]
push ecx
push ebx
push eax
call fcn.00521ba0
mov edx, dword [esi + 8]
mov eax, dword [edi + 8]
add esp, 0xc
mov ecx, esi
push edx
push eax
push ebx
call fcn.005218b0
mov ecx, edi
call fcn.00521400
mov ecx, dword [esi + 4]
lea edx, [ecx + eax*4]
mov dword [esi + 8], edx
jmp 0x51a9b0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push ecx
mov ecx, esi
call fcn.004d55a0
mov eax, dword [esi + 4]
push eax
call fcn.0056040b
add esp, 4
mov ecx, edi
call fcn.00521400
test eax, eax
jge 0x51a987
xor eax, eax
lea edx, [eax*4]
push edx
call fcn.005603e2
add esp, 4
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov edi, dword [edi + 4]
push eax
push ecx
push edi
mov ecx, esi
call fcn.005218b0
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov ebp, dword [ebp + 0x90]
mov ecx, dword [esp + 0x74]
lea eax, [esp + 0x24]
add ecx, ebp
push eax
call fcn.00521470
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push edx
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x74], 1
call fcn.004d55a0
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0056040b
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add esp, 4
xor esi, esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], esi
push edx
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov byte [esp + 0x74], 0
call fcn.004d55a0
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0056040b
add esp, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x6c], 0xffffffff
call fcn.004d4e80
mov ecx, dword [esp + 0x64]
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x60
ret 8