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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x80
mov ebx, ecx
cmp edx, 0x10
mov dword [esp + 0x10], edx
jae 0x51bcd0
xor eax, eax
test edx, edx
je 0x51bcd7
cmp edx, 8
mov edi, 0
jb 0x51bcac
movd xmm0, dword [ebx + 4]
movdqa xmm1, xmmword [0x54bcf0]
movd xmm3, dword [ebx]
movdqa xmm2, xmmword [0x54bd00]
mov edi, 8
pcmpgtb xmm0, xmm1
pcmpgtb xmm3, xmm1
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pand xmm0, xmm2
punpcklbw xmm3, xmm3
punpcklwd xmm3, xmm3
pand xmm3, xmm2
paddd xmm3, xmm0
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd eax, xmm1
je 0x51bcd7
mov ecx, dword [esp + 0x10]
sub ecx, edi
add edi, ebx
nop word cs:[eax + eax]
nop
xor edx, edx
cmp byte [edi], 0xc0
setge dl
inc edi
add eax, edx
dec ecx
jne 0x51bcc0
jmp 0x51bcd7
mov ecx, ebx
call dbg.do_count_chars
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [esp + 0x20], eax
cmp edx, 0x10
jae 0x51bd84
test edx, edx
je 0x51bd8f
cmp edx, 8
mov edx, 0
mov eax, 0
jb 0x51bd5b
movd xmm0, dword [edi + 4]
movdqa xmm1, xmmword [0x54bcf0]
movd xmm3, dword [edi]
movdqa xmm2, xmmword [0x54bd00]
mov eax, 8
pcmpgtb xmm0, xmm1
pcmpgtb xmm3, xmm1
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pand xmm0, xmm2
punpcklbw xmm3, xmm3
punpcklwd xmm3, xmm3
pand xmm3, xmm2
paddd xmm3, xmm0
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
je 0x51bd91
mov ecx, dword [ebp + 0xc]
sub ecx, eax
add eax, edi
nop word cs:[eax + eax]
nop dword [eax]
mov esi, edx
xor edx, edx
cmp byte [eax], 0xc0
setge dl
inc eax
add esi, edx
dec ecx
mov edx, esi
jne 0x51bd70
jmp 0x51bd91
mov ecx, edi
call dbg.do_count_chars
mov edx, eax
jmp 0x51bd91
xor edx, edx
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
movsd xmm0, qword [0x54bd10]
lea eax, [ebx + esi]
mov dword [esp + 0x5c], eax
mov eax, edx
or eax, ecx
mov eax, dword [ebp + 0xc]
lea eax, [edi + eax]
mov dword [esp + 0x2c], eax
je 0x51c347
test ecx, ecx
xorpd xmm4, xmm4
je 0x51c34b
test edx, edx
je 0x51c34b
cmp dword [esp + 0x20], 1
mov dword [esp + 0xc], ebx
jne 0x51bf3f
cmp edx, 1
jne 0x51bf3f
mov eax, edi
mov ecx, ebx
jmp 0x51bdfd
inc eax
cmp ebx, edx
mov ebx, dword [esp + 0xc]
jne 0x51c2f1
cmp ecx, dword [esp + 0x5c]
je 0x51c2f7
movzx edx, byte [ecx]
test dl, dl
js 0x51be20
inc ecx
cmp eax, dword [esp + 0x2c]
jne 0x51beb0
jmp 0x51c2f1
movzx ebx, byte [ecx + 1]
mov esi, edx
and esi, 0x1f
and ebx, 0x3f
cmp dl, 0xdf
jbe 0x51be77
movzx edi, byte [ecx + 2]
shl ebx, 6
and edi, 0x3f
or edi, ebx
cmp dl, 0xf0
jb 0x51be90
movzx edx, byte [ecx + 3]
shl edi, 6
and esi, 7
mov ebx, dword [esp + 0xc]
shl esi, 0x12
and edx, 0x3f
or edx, edi
mov edi, dword [ebp + 8]
or edx, esi
cmp edx, 0x110000
je 0x51c2f7
add ecx, 4
cmp eax, dword [esp + 0x2c]
jne 0x51beb0
jmp 0x51c2f1
shl esi, 6
add ecx, 2
or esi, ebx
mov ebx, dword [esp + 0xc]
mov edx, esi
cmp eax, dword [esp + 0x2c]
jne 0x51beb0
jmp 0x51c2f1
shl esi, 0xc
mov ebx, dword [esp + 0xc]
add ecx, 3
or edi, esi
mov edx, edi
mov edi, dword [ebp + 8]
cmp eax, dword [esp + 0x2c]
je 0x51c2f1
nop dword [eax + eax]
movzx ebx, byte [eax]
test bl, bl
jns 0x51bdf0
mov dword [esp + 0x30], ecx
mov ecx, eax
movzx eax, byte [eax + 1]
mov esi, ebx
and esi, 0x1f
and eax, 0x3f
cmp bl, 0xdf
jbe 0x51bf0d
movzx edi, byte [ecx + 2]
shl eax, 6
and edi, 0x3f
or edi, eax
cmp bl, 0xf0
jb 0x51bf1b
movzx ebx, byte [ecx + 3]
and esi, 7
shl edi, 6
shl esi, 0x12
and ebx, 0x3f
or ebx, edi
or ebx, esi
cmp ebx, 0x110000
je 0x51c51f
mov edi, dword [ebp + 8]
mov eax, ecx
add eax, 4
jmp 0x51bf2a
shl esi, 6
add ecx, 2
or esi, eax
mov eax, ecx
mov ebx, esi
jmp 0x51bf2a
shl esi, 0xc
add ecx, 3
or edi, esi
mov eax, ecx
mov ebx, edi
mov edi, dword [ebp + 8]
mov ecx, dword [esp + 0x30]
cmp ebx, edx
mov ebx, dword [esp + 0xc]
je 0x51bdfd
jmp 0x51c2f1
mov eax, dword [esp + 0x20]
mov ecx, edx
cmp eax, edx
cmova ecx, eax
test edx, edx
mov dword [esp + 0x28], ecx
js 0x51c54c
movzx eax, byte [0x5c6170]
mov eax, dword [0x5c6108]
test eax, eax
jne 0x51bf7c
mov esi, edx
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x51c53e
mov edx, esi
mov dword [0x5c6108], eax
push edx
push 0
push eax
mov esi, edx
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x51c53e
mov ecx, dword [esp + 0x28]
xor edx, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], 0
mov dword [esp + 0x64], esi
shr ecx, 1
mov dword [esp + 0x28], ecx
dec ecx
mov dword [esp + 0x14], ecx
jmp 0x51bfd8
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x54]
mov byte [eax + edx], 0
mov edx, dword [esp + 0x54]
inc edx
dec esi
mov dword [esp + 0x54], edx
je 0x51bfe9
cmp edx, dword [esp + 0x50]
jne 0x51bfc8
lea ecx, [esp + 0x4c]
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::reserve_for_push::h02b0b77fb1491d4d
jmp 0x51bfc0
mov eax, dword [esp + 0x64]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x4c]
neg dword [esp + 0x28]
movq xmm2, qword [0x54bd10]
mov esi, dword [esp + 0x14]
xorpd xmm0, xmm0
mov dword [esp + 0x60], 0
pxor xmm1, xmm1
mov dword [esp + 0x30], ebx
xor ecx, ecx
dec eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x70], eax
nop word cs:[eax + eax]
nop
mov ebx, dword [esp + 0x30]
cmp ebx, dword [esp + 0x5c]
je 0x51c26d
movzx eax, byte [ebx]
test al, al
js 0x51c050
inc ebx
jmp 0x51c0d0
movzx edi, byte [ebx + 1]
mov edx, eax
and eax, 0x1f
and edi, 0x3f
cmp dl, 0xdf
jbe 0x51c0a8
mov esi, ebx
shl edi, 6
add ebx, 3
movzx esi, byte [esi + 2]
and esi, 0x3f
or esi, edi
cmp dl, 0xf0
jb 0x51c0b5
movzx edi, byte [ebx]
and eax, 7
shl esi, 6
mov ebx, dword [esp + 0x30]
shl eax, 0x12
and edi, 0x3f
or edi, esi
mov esi, dword [esp + 0x14]
or edi, eax
mov eax, edi
cmp edi, 0x110000
mov edi, dword [ebp + 8]
je 0x51c26d
add ebx, 4
jmp 0x51c0d0
shl eax, 6
add ebx, 2
or eax, edi
mov edi, dword [ebp + 8]
jmp 0x51c0d0
shl eax, 0xc
mov edi, dword [ebp + 8]
or esi, eax
mov eax, esi
mov esi, dword [esp + 0x14]
nop word cs:[eax + eax]
nop dword [eax]
mov dword [esp + 0x78], eax
lea eax, [ecx + 1]
cmp ecx, esi
mov dword [esp + 0x30], ebx
jbe 0x51c114
add ecx, esi
mov ebx, edi
mov edi, esi
mov esi, eax
mov eax, dword [esp + 0x70]
mov edx, ecx
cmp eax, ecx
mov ecx, dword [esp + 0x28]
cmovb edx, eax
mov eax, esi
mov esi, edi
mov edi, ebx
lea ebx, [ecx + eax]
mov ecx, eax
cmp ebx, edx
ja 0x51c030
cmp dword [ebp + 0xc], 0
jne 0x51c12d
jmp 0x51c266
mov ebx, dword [esp + 0x70]
add ecx, esi
cmp ebx, ecx
cmovb ecx, ebx
xor ebx, ebx
mov edx, ecx
cmp dword [ebp + 0xc], 0
je 0x51c266
mov dword [esp + 0x24], ebx
xor ecx, ecx
mov ebx, edi
mov dword [esp + 0x1c], eax
jmp 0x51c14f
mov ebx, dword [esp + 0x18]
inc ecx
cmp ebx, dword [esp + 0x2c]
je 0x51c262
movzx eax, byte [ebx]
test al, al
js 0x51c170
inc ebx
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x24]
cmp ebx, ecx
jbe 0x51c210
jmp 0x51c140
movzx esi, byte [ebx + 1]
mov edi, eax
and edi, 0x1f
and esi, 0x3f
cmp al, 0xdf
jbe 0x51c1de
mov dword [esp + 0x74], esi
lea esi, [ebx + 3]
mov dword [esp + 0x18], ebx
movzx ebx, byte [ebx + 2]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x74]
and ebx, 0x3f
shl esi, 6
or ebx, esi
cmp al, 0xf0
jb 0x51c1ee
mov eax, dword [esp + 0x68]
shl ebx, 6
and edi, 7
mov esi, dword [esp + 0x14]
shl edi, 0x12
movzx eax, byte [eax]
and eax, 0x3f
or eax, ebx
mov ebx, dword [esp + 0x24]
or eax, edi
cmp eax, 0x110000
je 0x51c25f
add dword [esp + 0x18], 4
mov edi, dword [ebp + 8]
cmp ebx, ecx
jbe 0x51c210
jmp 0x51c140
shl edi, 6
add ebx, 2
or edi, esi
mov dword [esp + 0x18], ebx
mov eax, edi
jmp 0x51c1fd
mov esi, dword [esp + 0x68]
shl edi, 0xc
or ebx, edi
mov eax, ebx
mov dword [esp + 0x18], esi
mov edi, dword [ebp + 8]
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
cmp ebx, ecx
ja 0x51c140
cmp ecx, edx
ja 0x51c140
cmp dword [esp + 0x78], eax
jne 0x51c140
cmp ecx, dword [esp + 0x6c]
jae 0x51c52b
mov eax, dword [esp + 0x58]
cmp byte [eax + ecx], 0
jne 0x51c140
mov eax, dword [esp + 0x58]
cmp ecx, dword [esp + 0x60]
mov byte [eax + ecx], 1
jae 0x51c24c
addsd xmm1, xmm2
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x60], ecx
addsd xmm0, xmm2
mov ecx, eax
jmp 0x51c030
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x1c]
mov ecx, eax
jmp 0x51c030
xorpd xmm4, xmm4
ucomisd xmm0, xmm4
jne 0x51c279
jnp 0x51c2c9
movss xmm2, dword [esp + 0x64]
movss xmm3, dword [esp + 0x20]
movapd xmm4, xmm0
subsd xmm4, xmm1
divsd xmm4, xmm0
unpcklpd xmm3, xmm2
movapd xmm2, xmmword [0x54bd20]
orpd xmm3, xmm2
subpd xmm3, xmm2
movapd xmm2, xmm0
unpcklpd xmm2, xmm0
divpd xmm2, xmm3
movapd xmm3, xmm2
unpckhpd xmm3, xmm2
addsd xmm3, xmm2
addsd xmm4, xmm3
mulsd xmm4, qword [0x54bd30]
cmp dword [esp + 0x50], 0
mov ebx, dword [esp + 0xc]
je 0x51c2f1
push dword [esp + 0x58]
push 0
push dword [0x5c6108]
movapd xmmword [esp + 0x3c], xmm4
call sub.KERNEL32.dll_HeapFree
movapd xmm4, xmmword [esp + 0x30]
mov esi, dword [esp + 0x10]
jmp 0x51c34b
cmp eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x10]
je 0x51c347
movzx ecx, byte [eax]
test cl, cl
jns 0x51c34b
cmp cl, 0xe0
jb 0x51c34b
cmp cl, 0xf0
jb 0x51c34b
movzx esi, byte [eax + 1]
mov edx, eax
movzx eax, byte [eax + 2]
and ecx, 7
movzx edx, byte [edx + 3]
shl ecx, 0x12
and esi, 0x3f
and eax, 0x3f
shl esi, 0xc
shl eax, 6
and edx, 0x3f
or eax, esi
mov esi, dword [esp + 0x10]
or edx, eax
or edx, ecx
cmp edx, 0x110000
jne 0x51c34b
movapd xmm4, xmm0
xor eax, eax
test esi, esi
je 0x51c4df
nop word cs:[eax + eax]
nop
movzx ecx, byte [ebx]
test cl, cl
js 0x51c380
inc ebx
cmp edi, dword [esp + 0x2c]
jne 0x51c410
jmp 0x51c4df
mov dword [esp + 0x30], edi
movzx edi, byte [ebx + 1]
mov edx, ecx
and edx, 0x1f
and edi, 0x3f
cmp cl, 0xdf
jbe 0x51c3d8
movzx esi, byte [ebx + 2]
shl edi, 6
and esi, 0x3f
or esi, edi
cmp cl, 0xf0
jb 0x51c3f1
movzx ecx, byte [ebx + 3]
and edx, 7
shl esi, 6
mov edi, dword [esp + 0x30]
shl edx, 0x12
and ecx, 0x3f
or ecx, esi
or ecx, edx
cmp ecx, 0x110000
je 0x51c4df
add ebx, 4
cmp edi, dword [esp + 0x2c]
jne 0x51c410
jmp 0x51c4df
shl edx, 6
add ebx, 2
or edx, edi
mov edi, dword [esp + 0x30]
mov ecx, edx
cmp edi, dword [esp + 0x2c]
jne 0x51c410
jmp 0x51c4df
mov edi, dword [esp + 0x30]
shl edx, 0xc
add ebx, 3
or esi, edx
mov ecx, esi
cmp edi, dword [esp + 0x2c]
je 0x51c4df
nop dword [eax]
movzx edx, byte [edi]
test dl, dl
js 0x51c430
inc edi
cmp ecx, 0x110000
jne 0x51c4d0
jmp 0x51c4df
mov dword [esp + 0xc], ebx
movzx ebx, byte [edi + 1]
mov esi, edx
and esi, 0x1f
and ebx, 0x3f
cmp dl, 0xdf
jbe 0x51c48f
mov dword [esp + 0x30], edi
movzx edi, byte [edi + 2]
shl ebx, 6
and edi, 0x3f
or edi, ebx
cmp dl, 0xf0
jb 0x51c4a7
mov edx, dword [esp + 0x30]
and esi, 7
shl edi, 6
mov ebx, dword [esp + 0xc]
shl esi, 0x12
movzx edx, byte [edx + 3]
and edx, 0x3f
or edx, edi
or edx, esi
cmp edx, 0x110000
je 0x51c4df
mov edi, dword [esp + 0x30]
add edi, 4
cmp ecx, 0x110000
jne 0x51c4d0
jmp 0x51c4df
shl esi, 6
add edi, 2
or esi, ebx
mov ebx, dword [esp + 0xc]
mov edx, esi
cmp ecx, 0x110000
jne 0x51c4d0
jmp 0x51c4df
shl esi, 0xc
add dword [esp + 0x30], 3
mov ebx, dword [esp + 0xc]
or edi, esi
mov edx, edi
mov edi, dword [esp + 0x30]
cmp ecx, 0x110000
je 0x51c4df
nop word cs:[eax + eax]
nop dword [eax]
cmp ecx, edx
jne 0x51c4df
inc eax
cmp ebx, dword [esp + 0x5c]
jne 0x51c360
movd xmm1, eax
movsd xmm2, qword [0x54bd10]
por xmm1, xmmword [0x54bd20]
movapd xmm0, xmm2
subsd xmm1, qword [0x54bd38]
subsd xmm0, xmm4
mulsd xmm1, qword [0x54bd40]
mulsd xmm0, xmm1
addsd xmm0, xmm4
minsd xmm0, xmm2
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esp + 0xc]
mov edi, dword [ebp + 8]
jmp 0x51c2f1
mov edx, dword [esp + 0x6c]
push 0x5a2930
call dbg.panic_bounds_check
add esp, 4
ud2
mov ecx, 1
mov edx, esi
call dbg.handle_alloc_error
ud2
call sym.alloc::raw_vec::capacity_overflow::hd0578b62e5d0dfac
ud2