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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x4c
cmp byte [ecx + 0x9e], 0
je 0x520228
cmp byte [ecx + 0x71], 0
jne 0x520248
mov dword [esp], 2
mov ecx, ebx
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 0x520239
cmp byte [ecx + 0x3b], 0xd
je 0x520239
cmp byte [ecx + 9], 8
je 0x520239
mov edi, dword [esp + 0x64]
imul edi, dword [0x59ad30]
add edi, dword [esp + 0x60]
imul edi, edi, 0xe
add edi, dword [0x5b39d0]
movzx eax, word [edi]
and ax, 0xf00
cmp ax, 0x400
jne 0x520510
movsx eax, word [edi + 4]
test eax, eax
jle 0x52081c
cmp eax, dword [0x5b504c]
jg 0x52081c
sub eax, 1
imul eax, dword [0x5b5050]
mov edx, dword [0x5b5059]
mov esi, dword [edx + eax]
movsx eax, word [esi + 0xf]
mov dword [esp], eax
call fcn.0051dd70
sub esp, 4
test eax, eax
je 0x520228
cmp byte [ebx + 8], 0x41
je 0x520530
movzx eax, word [ebx + 0x1c]
movzx edx, word [ebx + 0x1a]
sar ax, 5
sar dx, 5
cwde
imul eax, dword [0x59ad30]
movsx edx, dx
add eax, edx
movzx edx, byte [edi + 0xc]
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
cmp byte [eax + 0xc], dl
je 0x520530
mov ecx, ebx
call fcn.0051ea10
mov ecx, 0x5b62e0
mov dword [esp + 0x2c], eax
mov edi, eax
movsx eax, byte [esi + 4]
mov dword [esp], eax
call fcn.00438280
mov ecx, ebx
sub esp, 4
mov dword [esp + 0x10], edi
movsx edx, word [eax + 0x4a]
mov dword [esp + 0xc], edx
movsx eax, word [eax + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.00522690
sub esp, 0x14
mov dword [esp + 0x28], 1
test eax, eax
je 0x5206c7
movzx edx, byte [ebx + 0x42]
cmp dl, 0x16
jbe 0x520548
mov byte [ebx + 0x42], 2
movzx eax, word [esi + 7]
mov word [ebx + 0x43], ax
movzx eax, word [esp + 0x60]
mov word [esp + 0x20], ax
mov word [ebx + 0x45], ax
movzx eax, word [esp + 0x64]
mov word [esp + 0x22], ax
mov word [ebx + 0x47], ax
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp], 0
call dword [eax + 0x78]
mov byte [ebx + 0xc], 0
mov ecx, ebx
sub esp, 4
call fcn.00524aa0
mov edi, eax
test eax, eax
jne 0x520620
movsx eax, byte [esi + 4]
mov ecx, 0x5b62e0
mov dword [esp], eax
call fcn.00438280
mov ecx, ebx
mov ebp, eax
movsx eax, word [eax + 0x4a]
sub esp, 4
mov dword [esp + 0xc], eax
movsx eax, word [ebp + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.0051d060
mov ecx, ebx
sub esp, 0x10
mov dword [esp], eax
mov dword [esp + 4], 0x4c
mov dword [esp + 0x24], eax
call fcn.0051e640
movzx edx, byte [ebx + 0xc]
sub esp, 8
lea ecx, [edx + edx*8]
mov eax, dword [esp + 0x24]
lea edx, [edx + ecx*2]
add edx, dword [ebx + 0x6d]
movzx ecx, byte [edx + 2]
cmp eax, ecx
jle 0x520580
mov eax, dword [esp + 0x68]
or eax, dword [esp + 0x6c]
je 0x520678
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
add edx, dword [esp + 0x6c]
add eax, dword [esp + 0x68]
js 0x52077e
mov ecx, dword [0x59ad30]
lea ebp, [ecx - 1]
cmp eax, ecx
cmovge eax, ebp
test edx, edx
js 0x520785
mov ecx, dword [0x59ad2c]
lea ebp, [ecx - 1]
cmp edx, ecx
cmovge edx, ebp
mov dword [esp + 0x1c], 0
mov ecx, ebx
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
call fcn.0052d7d0
sub esp, 0x20
mov eax, dword [esp + 0x70]
mov byte [ebx + 0x33], 0
test eax, eax
jne 0x5206bb
mov byte [ebx + 0x3b], 2
movzx eax, word [esi + 7]
mov word [ebx + 0x3c], ax
movzx eax, word [esp + 0x20]
mov word [ebx + 0x3e], ax
movzx eax, word [esp + 0x22]
mov word [ebx + 0x40], ax
test edi, edi
je 0x520239
mov ecx, ebx
call fcn.0052c4f0
jmp 0x520239
movzx eax, byte [ecx + 0x42]
cmp al, 0x16
ja 0x520239
mov edx, 0xffb6ffff
bt edx, eax
jae 0x520228
jmp 0x520239
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
jmp 0x52036d
mov eax, 0xffb6fffb
bt eax, edx
jb 0x52037a
movzx eax, word [esi + 7]
cmp word [ebx + 0x43], ax
je 0x520636
mov ecx, 0xffb6ffff
bt ecx, edx
jae 0x520382
jmp 0x52037a
cmp byte [ebx + 9], 1
jne 0x5204d6
mov eax, dword [ebx + 0x1a]
mov dword [esp + 0x24], edx
mov ecx, ebx
mov dword [esp], 0
mov dword [ebx + 0x12], eax
mov eax, dword [ebx]
call dword [eax + 0x2c]
sub esp, 4
cmp byte [esi + 4], 7
mov edx, dword [esp + 0x24]
je 0x52078c
movsx eax, word [esi + 0x27]
mov ecx, ebx
mov dword [esp + 0xc], eax
movsx eax, word [esi + 0x25]
mov dword [esp + 8], eax
movzx eax, word [ebx + 0x1c]
sar ax, 5
cwde
mov dword [esp + 4], eax
movzx eax, word [ebx + 0x1a]
sar ax, 5
cwde
mov dword [esp], eax
call fcn.0051e860
sub esp, 0x10
mov edx, dword [esp + 0x24]
mov ecx, ebx
mov dword [esp + 0x24], edx
call fcn.004de440
test eax, eax
je 0x520802
mov edx, dword [esp + 0x24]
cmp byte [edx + 2], 1
jne 0x5204d6
mov ecx, ebx
call fcn.0052fa90
jmp 0x5204d6
mov dword [esp], 0x64
mov ecx, ebx
call fcn.0052c4d0
sub esp, 4
jmp 0x5203c8
movsx ecx, word [ebx + 0x45]
cmp dword [esp + 0x60], ecx
jne 0x520564
movsx ecx, word [ebx + 0x47]
cmp dword [esp + 0x64], ecx
jne 0x520564
cmp byte [ebx + 9], 1
jne 0x520239
movzx eax, word [esp + 0x60]
mov word [esp + 0x20], ax
movzx eax, word [esp + 0x64]
mov word [esp + 0x22], ax
jmp 0x5203a2
mov edx, dword [esp + 0x28]
test edx, edx
je 0x520721
movsx eax, word [esp + 0x2c]
mov dword [esp + 0xc], 0xc
mov ecx, ebx
mov dword [esp + 0x10], eax
movsx eax, byte [esi + 4]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.00522250
sub esp, 0x14
jmp 0x5204c6
mov dword [ebx + 0x49], 0
jmp 0x5204d6
movzx eax, byte [ebx + 0x42]
cmp al, 0x16
jbe 0x5207ef
mov esi, dword [esp + 0x64]
mov eax, dword [ebx]
mov dword [esp + 0x1c], 0
mov ecx, ebx
mov dword [esp + 0x18], 1
mov dword [esp + 4], esi
mov esi, dword [esp + 0x60]
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp], esi
call dword [eax + 0x7c]
sub esp, 0x20
jmp 0x520239
mov dword [esp + 0x1c], 1
mov ecx, ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
movsx eax, word [ebp + 0x4a]
mov dword [esp + 0xc], eax
movsx eax, word [ebp + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.00516ad0
sub esp, 0x20
test eax, eax
jne 0x5204c6
mov dword [ebx + 0x49], 0xffffffff
jmp 0x5204d6
xor eax, eax
jmp 0x52046f
xor edx, edx
jmp 0x520485
movzx eax, word [ebx + 0x1a]
movzx ebp, word [ebx + 0x1c]
sar ax, 5
sar bp, 5
movsx ecx, ax
mov dword [esp + 0x28], ecx
movsx ecx, bp
mov dword [esp + 0x24], ecx
movsx ecx, word [esi + 0x15]
cmp ax, cx
jle 0x5207b7
movsx ecx, word [esi + 0x19]
cmp bp, word [esi + 0x27]
jge 0x52080e
movsx eax, word [esi + 0x17]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ecx
mov ecx, ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov dword [esp], eax
call fcn.0051e860
sub esp, 0x10
mov edx, dword [esp + 0x2c]
jmp 0x5205ea
mov edx, 0xffb6ffff
bt edx, eax
jae 0x520239
jmp 0x5206d3
mov ecx, ebx
call fcn.0052faa0
jmp 0x5204d6
je 0x520816
movsx eax, word [esi + 0x1b]
jmp 0x5207c1
mov eax, dword [esp + 0x24]
jmp 0x5207c1
movzx eax, word [0xf]
ud2