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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
cmp byte [ecx + 0x9e], 0
je 0x5218d6
cmp byte [ecx + 0x71], 0
jne 0x5218f0
mov dword [esp], 2
call fcn.0052c430
sub esp, 4
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 0x14
fld dword [ecx + 0x58]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fldz
fcompi st(1)
fstp st(0)
jae 0x5218e5
cmp byte [ecx + 0x3b], 0xd
je 0x5218e5
cmp byte [ecx + 9], 8
je 0x5218e5
mov ebx, dword [esp + 0x64]
imul ebx, dword [0x59ad30]
add ebx, dword [esp + 0x60]
imul ebx, ebx, 0xe
add ebx, dword [0x5b39d0]
movzx eax, word [ebx]
and ax, 0xf00
cmp ax, 0x500
je 0x521960
movzx eax, byte [ecx + 0x42]
cmp al, 0x16
ja 0x5218e5
mov edx, 0xffb6ffff
bt edx, eax
jb 0x5218e5
mov eax, dword [ecx]
mov dword [esp], 2
call dword [eax + 0x78]
sub esp, 4
jmp 0x5218e5
movsx eax, byte [ebx + 0xb]
mov dword [esp + 0x24], ecx
mov dword [esp], eax
call fcn.0051dd70
sub esp, 4
test eax, eax
mov ecx, dword [esp + 0x24]
je 0x5218d6
cmp byte [ecx + 8], 0x41
je 0x521b60
movzx eax, word [ecx + 0x1c]
movzx edx, word [ecx + 0x1a]
sar ax, 5
sar dx, 5
cwde
imul eax, dword [0x59ad30]
movsx edx, dx
add eax, edx
movzx edx, byte [ebx + 0xc]
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
cmp byte [eax + 0xc], dl
je 0x521b60
call fcn.0051ea10
mov dword [esp + 0xc], 1
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.00522690
sub esp, 0x14
test eax, eax
mov dword [esp + 0x28], 1
mov ecx, dword [esp + 0x24]
je 0x521cac
movzx eax, byte [ecx + 0x42]
cmp al, 0x16
jbe 0x521b75
mov byte [ecx + 0x42], 4
xor esi, esi
movzx edi, word [esp + 0x60]
mov word [ecx + 0x43], si
movzx esi, word [esp + 0x64]
mov word [ecx + 0x45], di
mov word [ecx + 0x47], si
mov eax, dword [ecx]
mov dword [esp + 0x24], ecx
mov dword [esp], 0
call dword [eax + 0x78]
sub esp, 4
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x64]
mov byte [ecx + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov dword [esp], eax
call fcn.0051d060
sub esp, 0x10
mov ebx, eax
mov dword [esp + 4], 0x4c
mov ecx, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0051e640
sub esp, 8
mov ecx, dword [esp + 0x24]
movzx edx, byte [ecx + 0xc]
lea ebp, [edx + edx*8]
lea ebp, [edx + ebp*2]
add ebp, dword [ecx + 0x6d]
movzx edx, byte [ebp + 2]
cmp edx, ebx
jge 0x521bb0
mov eax, dword [esp + 0x68]
or eax, dword [esp + 0x6c]
je 0x521c30
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
add edx, dword [esp + 0x6c]
add eax, dword [esp + 0x68]
js 0x521d80
mov ebx, dword [0x59ad30]
lea ebp, [ebx - 1]
cmp ebx, eax
cmovle eax, ebp
test edx, edx
js 0x521d79
mov ebx, dword [0x59ad2c]
lea ebp, [ebx - 1]
cmp ebx, edx
cmovle edx, ebp
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x24], ecx
call fcn.0052d7d0
sub esp, 0x20
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x70]
mov byte [ecx + 0x33], 0
test edx, edx
jne 0x521c79
xor eax, eax
mov byte [ecx + 0x3b], 4
mov word [ecx + 0x3c], ax
mov word [ecx + 0x3e], di
mov word [ecx + 0x40], si
jmp 0x5218e5
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
jmp 0x521a08
mov edx, 0xffb6ffef
bt edx, eax
jb 0x521a14
cmp word [ecx + 0x43], 0
jne 0x521b98
movsx edx, word [ecx + 0x45]
cmp edx, dword [esp + 0x60]
je 0x521c85
mov edx, 0xffb6ffff
bt edx, eax
jae 0x521a18
jmp 0x521a14
cmp byte [ecx + 9], 1
jne 0x521b47
mov eax, dword [ecx + 0x1a]
mov dword [esp + 0x24], ecx
mov dword [ecx + 0x12], eax
mov eax, dword [ecx]
mov dword [esp], 0
call dword [eax + 0x2c]
movsx eax, si
sub esp, 4
mov ecx, dword [esp + 0x24]
mov dword [esp + 0xc], eax
movsx eax, di
mov dword [esp + 8], eax
movzx eax, word [ecx + 0x1c]
sar ax, 5
cwde
mov dword [esp + 4], eax
movzx eax, word [ecx + 0x1a]
sar ax, 5
cwde
mov dword [esp], eax
call fcn.0051e860
sub esp, 0x10
mov ecx, dword [esp + 0x24]
call fcn.004de440
mov ecx, dword [esp + 0x24]
test eax, eax
je 0x521d87
cmp byte [ebp + 2], 1
jne 0x521b47
call fcn.0052fa90
mov ecx, dword [esp + 0x24]
jmp 0x521b47
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x521d16
mov eax, dword [esp + 0x64]
movsx ebx, word [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0xc], 0xe
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0
mov dword [esp], eax
call fcn.00522250
sub esp, 0x14
mov ecx, dword [esp + 0x24]
jmp 0x521b37
mov dword [ecx + 0x49], 0
jmp 0x521b47
movsx edx, word [ecx + 0x47]
cmp edx, dword [esp + 0x64]
jne 0x521b98
cmp byte [ecx + 9], 1
jne 0x5218e5
movzx edi, word [esp + 0x60]
movzx esi, word [esp + 0x64]
jmp 0x521a30
movzx eax, byte [ecx + 0x42]
cmp al, 0x10
je 0x5218e5
cmp al, 0x13
je 0x5218e5
cmp byte [ecx + 0x3b], 0x16
je 0x5218e5
mov eax, dword [ecx]
mov esi, dword [esp + 0x64]
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x60]
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [eax + 0x7c]
sub esp, 0x20
jmp 0x5218e5
mov eax, dword [esp + 0x64]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 5
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov dword [esp], eax
mov dword [esp + 0x24], ecx
call fcn.00516ad0
sub esp, 0x20
test eax, eax
mov ecx, dword [esp + 0x24]
jne 0x521b37
mov dword [ecx + 0x49], 0xffffffff
jmp 0x521b47
xor edx, edx
jmp 0x521af0
xor eax, eax
jmp 0x521ada
mov dword [esp + 0x24], ecx
call fcn.0052faa0
mov ecx, dword [esp + 0x24]
jmp 0x521b47