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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
fld dword [ecx + 0x58]
mov eax, dword [esp + 0x70]
fstp dword [esp + 0x4c]
fld dword [esp + 0x4c]
fldz
fcompi st(1)
fstp st(0)
jae 0x51ed3e
cmp byte [ecx + 0x3b], 0xd
mov ebx, ecx
je 0x51ed3e
cmp byte [ecx + 9], 8
je 0x51ed3e
cwde
movzx ecx, word [ecx + 0x1a]
movzx edx, word [ebx + 0x1c]
test eax, eax
jle 0x51f2b7
cmp eax, dword [0x5b5310]
jg 0x51f2b7
sub eax, 1
imul eax, dword [0x5b5314]
mov esi, dword [0x5b531d]
mov ebp, dword [esi + eax]
movzx eax, byte [ebp + 8]
movzx esi, word [ebp + 0x1a]
movzx edi, word [ebp + 0x1c]
mov byte [esp + 0x25], al
cmp byte [esp + 0x25], 0
mov word [esp + 0x26], si
mov eax, dword [0x59ad30]
mov esi, dword [0x5b39d0]
jne 0x51ed50
movzx eax, byte [ebx + 0x42]
cmp al, 0x16
ja 0x51ed3e
mov edx, 0xffb6ffff
bt edx, eax
jb 0x51ed3e
mov dword [esp], 2
mov ecx, ebx
call fcn.0052c430
sub esp, 4
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
sar cx, 5
sar dx, 5
mov word [esp + 0x32], cx
movsx ecx, dx
movzx edx, word [esp + 0x26]
sar di, 5
mov dword [esp + 0x34], ecx
sar dx, 5
mov word [esp + 0x30], di
movsx edi, di
movsx ecx, dx
mov word [esp + 0x26], dx
movzx edx, byte [ebx + 8]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edi
cmp dl, 0x41
je 0x51eed7
imul edi, eax
add edi, ecx
imul edi, edi, 0xe
add edi, esi
cmp dl, 0x4c
jne 0x51eeb0
cmp byte [esp + 0x25], 0x53
jne 0x51eeb0
imul eax, dword [esp + 0x34]
movsx edx, word [esp + 0x32]
add eax, edx
movzx edx, byte [edi + 0xc]
imul eax, eax, 0xe
cmp byte [esi + eax + 0xc], dl
je 0x51eed7
mov ecx, ebx
call fcn.0051ea10
mov dword [esp + 0x38], eax
lea esi, [esi]
movsx eax, word [edi + 4]
test eax, eax
jle 0x51f2b0
cmp eax, dword [0x5b5310]
jg 0x51f2b0
sub eax, 1
mov edx, dword [0x5b531d]
mov esi, dword [esp + 0x38]
mov ecx, ebx
imul eax, dword [0x5b5314]
mov eax, dword [edx + eax]
mov eax, dword [eax + 0x1e]
mov dword [esp + 0x10], esi
movsx edx, word [eax + 0x10]
mov dword [esp + 0xc], edx
movsx eax, word [eax + 0xe]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.00522690
sub esp, 0x14
mov dword [esp + 0x3c], 1
test eax, eax
jne 0x51eee7
movzx eax, byte [ebx + 0x42]
cmp al, 0x16
jbe 0x51f280
mov esi, dword [esp + 0x2c]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 1
mov dword [esp + 4], esi
mov esi, dword [esp + 0x28]
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 0x51ed3e
cmp byte [esp + 0x25], dl
jne 0x51f0b0
imul eax, dword [esp + 0x34]
movsx edx, word [esp + 0x32]
add eax, edx
movzx edx, byte [edi + 0xc]
imul eax, eax, 0xe
cmp byte [esi + eax + 0xc], dl
jne 0x51f0d0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
movsx eax, byte [ebp + 0x25]
mov ecx, ebx
mov dword [esp], eax
call fcn.0051dd70
sub esp, 4
test eax, eax
jne 0x51ef06
cmp byte [ebp + 0x22], 0xd
jne 0x51ed2d
movzx eax, byte [ebx + 0x42]
cmp al, 0x16
ja 0x51f0a0
mov edx, 0xffb6fffd
bt edx, eax
jb 0x51f0a0
movzx edx, word [ebp + 6]
cmp word [ebx + 0x43], dx
je 0x51f168
mov ecx, 0xffb6ffff
bt ecx, eax
jb 0x51f0a0
movzx eax, word [esp + 0x26]
mov word [ebx + 0x43], dx
mov word [ebx + 0x45], ax
movzx eax, word [esp + 0x30]
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 eax, dword [ebp + 0x1e]
mov ecx, ebx
sub esp, 4
movsx edx, word [eax + 0x10]
mov esi, dword [esp + 0x28]
mov dword [esp + 0xc], edx
movsx eax, word [eax + 0xe]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
call fcn.0051d060
mov ecx, ebx
sub esp, 0x10
mov edi, eax
movsx eax, byte [esp + 0x25]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0051e640
movzx eax, byte [ebx + 0xc]
sub esp, 8
lea edx, [eax + eax*8]
lea esi, [eax + edx*2]
add esi, dword [ebx + 0x6d]
movzx eax, byte [esi + 2]
cmp edi, eax
jle 0x51f0f0
mov edi, dword [esp + 0x74]
or edi, dword [esp + 0x78]
je 0x51f198
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
add edx, dword [esp + 0x78]
add eax, dword [esp + 0x74]
js 0x51f254
mov ecx, dword [0x59ad30]
lea esi, [ecx - 1]
cmp eax, ecx
cmovge eax, esi
test edx, edx
js 0x51f24d
mov ecx, dword [0x59ad2c]
lea esi, [ecx - 1]
cmp edx, ecx
cmovge edx, esi
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 + 0x7c]
mov byte [ebx + 0x33], 0
test eax, eax
jne 0x51f1e0
movzx esi, word [esp + 0x30]
cmp byte [ebx + 0x26], 0
mov byte [ebx + 0x3b], 1
movzx eax, word [ebp + 6]
mov word [ebx + 0x40], si
mov word [ebx + 0x3c], ax
movzx eax, word [esp + 0x26]
mov word [ebx + 0x3e], ax
je 0x51ed3e
mov word [ebx + 0x98], ax
mov word [ebx + 0x9a], si
jmp 0x51ed3e
mov byte [ebx + 0x42], 1
movzx edx, word [ebp + 6]
jmp 0x51ef3c
mov ecx, ebx
call fcn.00522660
test eax, eax
je 0x51f25b
mov esi, dword [0x5b39d0]
mov eax, dword [0x59ad30]
jmp 0x51eeba
mov ecx, ebx
call fcn.0051ea10
cmp byte [esp + 0x25], 0x41
mov dword [esp + 0x38], eax
jne 0x51ede0
movsx eax, word [edi + 6]
jmp 0x51ede4
cmp byte [ebx + 9], 1
jne 0x51f05d
mov eax, dword [ebx + 0x1a]
mov ecx, ebx
mov dword [ebx + 0x12], eax
mov eax, dword [ebx]
mov dword [esp], 0
call dword [eax + 0x2c]
mov ecx, ebx
sub esp, 4
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
movsx eax, word [esp + 0x32]
mov dword [esp], eax
call fcn.0051e860
mov ecx, ebx
sub esp, 0x10
call fcn.004de440
test eax, eax
je 0x51f2a4
cmp byte [esi + 2], 1
jne 0x51f05d
mov ecx, ebx
call fcn.0052fa90
mov byte [ebx + 0xe], 0
jmp 0x51f05d
movzx esi, word [esp + 0x26]
cmp si, word [ebx + 0x45]
jne 0x51ef2e
movzx esi, word [esp + 0x30]
cmp si, word [ebx + 0x47]
jne 0x51ef2e
cmp byte [ebx + 9], 1
jne 0x51ed3e
jmp 0x51ef52
mov edx, dword [esp + 0x3c]
test edx, edx
je 0x51f1f0
movsx eax, word [esp + 0x38]
mov dword [esp + 0xc], 0xb
mov ecx, ebx
mov dword [esp + 0x10], eax
movsx eax, word [ebp + 4]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.00522250
sub esp, 0x14
jmp 0x51f04d
mov dword [ebx + 0x49], 0
jmp 0x51f05d
mov dword [esp + 0x1c], 0
mov ecx, ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 1
movsx eax, word [ebp + 6]
mov dword [esp + 0xc], 3
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.0052d7d0
sub esp, 0x20
test eax, eax
jne 0x51f04d
mov dword [ebx + 0x49], 0xffffffff
jmp 0x51f05d
xor edx, edx
jmp 0x51f00c
xor eax, eax
jmp 0x51eff6
mov ecx, ebx
call fcn.00524270
test eax, eax
je 0x51ed3e
mov dword [esp], 0
mov ecx, ebx
call fcn.00524280
sub esp, 4
jmp 0x51ed3e
mov edx, 0xffb6ffff
bt edx, eax
jb 0x51ee5b
mov dword [esp], 1
mov ecx, ebx
call fcn.00524280
sub esp, 4
jmp 0x51ed3e
mov ecx, ebx
call fcn.0052faa0
jmp 0x51f05d
mov eax, dword [0x1e]
ud2
movzx eax, byte [8]
ud2