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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x10]
cmp eax, dword [ecx + 8]
jbe 0x51f904
sub esp, 0x90
mov eax, dword [esp + 0x9c]
xor ebx, ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 0
xor ebx, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x34], 0
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp], ebx
mov ebx, dword [esp + 0x50]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 8], ebx
call fcn.00440a10
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], ecx
cmp ecx, 0
je 0x51f877
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
mov dword [esp], eax
mov edx, dword [esp + 0x94]
mov ebx, dword [edx]
call ebx
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 4]
mov ebx, dword [esp + 0x60]
cmp ebx, 0
jne 0x51f699
mov dword [esp + 0x20], esi
mov ebp, dword [esp + 0x30]
cmp esi, ebp
je 0x51f578
mov dword [esp], 0x5c4440
mov eax, edi
cdq
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, edi
cdq
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
call fcn.0043c2d0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x9c]
cmp eax, ebx
ja 0x51f870
mov ecx, dword [esp + 0x98]
mov edx, eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], ebp
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x44], ecx
mov ebp, ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x88], edi
mov eax, edi
mov dword [esp + 0x40], edx
cmp edx, edi
jge 0x51f66a
mov eax, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x84], esi
mov dword [esp], esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.004537a0
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x24], edx
cmp esi, 0
jl 0x51f578
mov eax, 1
mov dword [esp + 0x20], esi
cmp esi, 0x80
jl 0x51f6c3
mov eax, esi
cmp esi, 0
jge 0x51f80a
mov eax, 0xffffffff
mov ebx, edx
add ebx, eax
cmp ebx, edi
jle 0x51f79d
mov ebp, edi
shl ebp, 1
add ebp, 4
mov dword [esp], 0x5c4440
mov eax, ebp
cdq
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, ebp
mov dword [esp + 0x28], ebp
cdq
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
call fcn.0043c2d0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x68]
cmp ecx, eax
ja 0x51f803
mov edx, dword [esp + 0x60]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x80], ebp
mov dword [esp + 0x84], edx
mov ebp, edx
mov dword [esp + 0x88], ecx
mov ebx, dword [esp + 0x8c]
mov dword [esp + 0x74], ebx
mov dword [esp + 0x7c], edi
mov eax, edi
mov dword [esp + 0x70], ecx
cmp ecx, edi
jge 0x51f761
mov eax, ecx
mov dword [esp + 0x78], esi
mov dword [esp], esi
mov dword [esp + 0x6c], ebp
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.004537a0
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x60], ebx
mov ebx, dword [esp + 0x58]
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x68], ebx
mov dword [esp + 0x38], edx
mov eax, edx
mov edx, dword [esp + 0x68]
cmp edi, edx
ja 0x51f7fc
cmp eax, edi
ja 0x51f7fc
mov ebp, edi
sub ebp, eax
sub edx, eax
mov ecx, dword [esp + 0x60]
cmp edx, 0
je 0x51f7c0
add ecx, eax
mov dword [esp + 0x84], ecx
mov dword [esp], ecx
mov dword [esp + 0x88], ebp
mov dword [esp + 4], ebp
mov dword [esp + 0x8c], edx
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
call fcn.0054cda0
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x38]
add ebx, ecx
mov dword [esp + 0x24], ebx
jmp 0x51f578
call fcn.004288f0
ud2
call fcn.004288f0
ud2
cmp esi, 0x7f
jg 0x51f819
mov eax, 1
jmp 0x51f6c3
cmp esi, 0x7ff
jg 0x51f82b
mov eax, 2
jmp 0x51f6c3
cmp esi, 0xd800
jl 0x51f844
cmp eax, 0xdfff
jg 0x51f844
mov eax, 0xffffffff
jmp 0x51f6c3
cmp eax, 0xffff
jg 0x51f855
mov eax, 3
jmp 0x51f6c3
cmp eax, 0x10ffff
jg 0x51f866
mov eax, 4
jmp 0x51f6c3
mov eax, 0xffffffff
jmp 0x51f6c3
call fcn.004288f0
ud2
mov ebx, dword [esp + 0x60]
cmp ebx, 0
jne 0x51f8a3
mov ebx, dword [esp + 0x98]
mov dword [esp + 0xa0], ebx
mov ebx, dword [esp + 0x9c]
mov dword [esp + 0xa4], ebx
add esp, 0x90
ret
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x68]
cmp eax, ecx
ja 0x51f8fd
mov edx, dword [esp + 0x60]
mov dword [esp], 0
mov dword [esp + 0x84], edx
mov dword [esp + 4], edx
mov dword [esp + 0x88], eax
mov dword [esp + 8], eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0xc], ecx
call fcn.00440110
mov ebx, dword [esp + 0x10]
mov dword [esp + 0xa0], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0xa4], ebx
add esp, 0x90
ret
call fcn.004288f0
ud2
call fcn.00450fb0
jmp fcn.0051f510