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

Disassembly:
push 0xffffffffffffffff
push 0x56b8d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x4c], esi
call fcn.0051dd50
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x148]
test eax, eax
je 0x521565
mov edi, dword [0x571438]
push 2
call edi
mov dword [esp + 0x18], eax
jmp 0x521577
push 3
call dword [0x571438]
mov edi, dword [0x571438]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x148]
test eax, eax
je 0x521585
push 2
jmp 0x521587
push 3
call dword [0x571540]
mov ecx, dword [0x5c9a04]
test ecx, ecx
jne 0x5215c8
mov ebp, dword [esp + 0x78]
test ebp, ebp
jne 0x5215b3
mov edi, dword [esp + 0x7c]
xor ecx, ecx
push eax
push edi
push ecx
call dword [0x57148c]
jmp 0x52180d
mov edi, dword [esp + 0x7c]
mov ecx, dword [ebp + 4]
push eax
push edi
push ecx
call dword [0x57148c]
jmp 0x52180d
mov ebx, dword [0x5c9f28]
lea eax, [esp + 0x24]
push 0
push eax
push 0
push 0x1008
mov dword [esp + 0x34], 0
call dword [0x571554]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x521606
mov eax, dword [esi + 0x148]
test eax, eax
je 0x521600
push 0x1b
jmp 0x521602
push 0x1c
call edi
mov ebx, eax
mov ecx, dword [esp + 0x18]
xor edx, edx
mov eax, ecx
mov dl, ch
shr ecx, 0x10
mov ebp, ecx
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xff
and ebp, 0xff
mov dword [esp + 0x48], ecx
xor ecx, ecx
mov cl, bh
mov edi, edx
and ecx, 0xff
and edi, 0xff
mov dword [esp + 0x38], ecx
mov ecx, ebp
neg ecx
mov dword [esp + 0x44], ecx
mov ecx, edi
neg ecx
and eax, 0xff
mov dword [esp + 0x40], ecx
mov ecx, eax
xor esi, esi
neg ecx
shl ebp, 6
shl edi, 6
and ebx, 0xff
mov dword [esp + 0x3c], ecx
mov ecx, ebp
mov ebp, dword [esp + 0x78]
mov edx, edi
mov edi, dword [esp + 0x7c]
shl eax, 6
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
mov ebx, dword [esp + 0x10]
add eax, ebx
sar eax, 6
mov byte [esp + 0x7c], al
mov eax, dword [esp + 0x14]
add eax, edx
mov edx, dword [esp + 0x18]
add ecx, edx
xor edx, edx
sar ecx, 6
sar eax, 6
mov dh, cl
lea ecx, [esp + 0x50]
mov dl, al
mov eax, dword [esp + 0x7c]
shl edx, 8
and eax, 0xff
or edx, eax
push edx
call fcn.00513dbe
mov ecx, edi
mov edx, dword [ecx]
mov dword [esp + 0x58], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x5c], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x60], edx
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x521743
mov eax, dword [edi + 0xc]
mov ebx, dword [edi + 4]
mov edx, eax
mov ecx, eax
sub edx, ebx
mov ebx, edx
imul ebx, esi
sar ebx, 6
sub ecx, ebx
inc esi
mov ebx, esi
mov dword [esp + 0x64], ecx
imul ebx, edx
sar ebx, 6
sub eax, ebx
sub ecx, eax
mov dword [esp + 0x5c], eax
test ecx, ecx
jle 0x521789
mov ecx, dword [esp + 0x54]
lea eax, [esp + 0x50]
mov edx, dword [ebp + 4]
neg eax
sbb eax, eax
and eax, ecx
lea ecx, [esp + 0x58]
push eax
push ecx
push edx
jmp 0x521783
mov edx, dword [edi]
mov eax, dword [edi + 8]
sub eax, edx
mov ecx, eax
imul ecx, esi
sar ecx, 6
add ecx, edx
inc esi
imul eax, esi
sar eax, 6
add eax, edx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x60], eax
sub eax, ecx
test eax, eax
jle 0x521789
mov ebx, dword [esp + 0x54]
lea eax, [esp + 0x50]
neg eax
mov ecx, dword [ebp + 4]
sbb eax, eax
and eax, ebx
push eax
lea eax, [esp + 0x5c]
push eax
push ecx
call dword [0x57148c]
mov dword [esp + 0x50], 0x573e88
lea ecx, [esp + 0x50]
mov dword [esp + 0x70], 0
call fcn.00513b6c
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
add eax, edx
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
add ebx, eax
mov eax, dword [esp + 0x28]
add eax, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x44]
add edx, ecx
mov ecx, dword [esp + 0x30]
add ecx, ebx
mov ebx, dword [esp + 0x48]
add dword [esp + 0x18], ebx
cmp esi, 0x40
mov dword [esp + 0x70], 0xffffffff
mov dword [esp + 0x50], 0x571ce4
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
jl 0x521698
mov esi, dword [esp + 0x4c]
mov eax, dword [esi + 0x148]
test eax, eax
je 0x52181b
push 9
jmp 0x52181d
push 0x13
call dword [0x571438]
push 1
mov ecx, ebp
mov ebx, eax
call fcn.00513980
mov edx, dword [ebp]
push ebx
mov ecx, ebp
mov dword [esp + 0x80], eax
call dword [edx + 0x38]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x1c]
test eax, eax
mov eax, 0x5c9fa0
jne 0x521854
mov eax, 0x5c9f80
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x30]
lea ecx, [esp + 0x20]
mov ebx, eax
call fcn.005132d2
lea eax, [esp + 0x20]
mov ecx, esi
push eax
mov dword [esp + 0x74], 1
call fcn.00513812
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x52189a
mov eax, dword [edi + 0xc]
mov ecx, dword [edi]
sub eax, 3
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
lea eax, [esp + 0x50]
jmp 0x5218ae
mov eax, dword [edi]
mov ecx, dword [edi + 4]
add eax, 3
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
lea eax, [esp + 0x50]
mov edx, dword [esp + 0x20]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push 0
mov esi, dword [edx - 8]
push esi
push edx
push edi
push 4
push eax
push ecx
mov ecx, dword [ebp + 4]
push ecx
call dword [0x5700c0]
mov edx, dword [ebp]
push ebx
mov ecx, ebp
call dword [edx + 0x30]
mov eax, dword [esp + 0x7c]
mov ecx, ebp
push eax
call fcn.00513980
mov eax, dword [esp + 0x78]
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x38]
lea ecx, [esp + 0x20]
mov dword [esp + 0x70], 0xffffffff
call fcn.005132cc
mov ecx, dword [esp + 0x68]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x64
ret 8