Function at 0x51f3c0
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 0x51f7b4
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.00440930
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], ecx
cmp ecx, 0
je 0x51f727
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 0x51f549
mov dword [esp + 0x20], esi
mov ebp, dword [esp + 0x30]
cmp esi, ebp
je 0x51f428
mov dword [esp], 0x5c41e0
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.0043c1f0
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 0x51f720
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 0x51f51a
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.004536c0
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x24], edx
cmp esi, 0
jl 0x51f428
mov eax, 1
mov dword [esp + 0x20], esi
cmp esi, 0x80
jl 0x51f573
mov eax, esi
cmp esi, 0
jge 0x51f6ba
mov eax, 0xffffffff
mov ebx, edx
add ebx, eax
cmp ebx, edi
jle 0x51f64d
mov ebp, edi
shl ebp, 1
add ebp, 4
mov dword [esp], 0x5c41e0
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.0043c1f0
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 0x51f6b3
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 0x51f611
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.004536c0
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 0x51f6ac
cmp eax, edi
ja 0x51f6ac
mov ebp, edi
sub ebp, eax
sub edx, eax
mov ecx, dword [esp + 0x60]
cmp edx, 0
je 0x51f670
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.0058fdb0
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x38]
add ebx, ecx
mov dword [esp + 0x24], ebx
jmp 0x51f428
call fcn.00428810
ud2
call fcn.00428810
ud2
cmp esi, 0x7f
jg 0x51f6c9
mov eax, 1
jmp 0x51f573
cmp esi, 0x7ff
jg 0x51f6db
mov eax, 2
jmp 0x51f573
cmp esi, 0xd800
jl 0x51f6f4
cmp eax, 0xdfff
jg 0x51f6f4
mov eax, 0xffffffff
jmp 0x51f573
cmp eax, 0xffff
jg 0x51f705
mov eax, 3
jmp 0x51f573
cmp eax, 0x10ffff
jg 0x51f716
mov eax, 4
jmp 0x51f573
mov eax, 0xffffffff
jmp 0x51f573
call fcn.00428810
ud2
mov ebx, dword [esp + 0x60]
cmp ebx, 0
jne 0x51f753
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 0x51f7ad
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.00440030
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.00428810
ud2
call fcn.00450ed0
jmp fcn.0051f3c0