Function at 0x180051cb0
Capabilities:
Hash data using sha1

Disassembly:
mov r11, rsp
push rbx
push rsi
push r15
sub rsp, 0x380
mov rax, qword [0x18010f050]
xor rax, rsp
mov qword [rsp + 0x350], rax
cmp byte [rdx], 0
mov rsi, r8
mov qword [rsp + 0x40], r8
mov r15, rdx
mov qword [rsp + 0x38], rdx
mov rbx, rcx
je 0x1800523c7
cmp byte [rsp + 0x3c0], 0
mov qword [r11 + 0x18], rbp
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov qword [r11 - 0x38], r14
je 0x180051eba
cmp dword [0x180118ad4], 0
jne 0x180051d1c
call fcn.18004f990
mov rdx, r15
mov rcx, rbx
call fcn.1800523f0
lea rcx, [rsp + 0xc0]
xor edx, edx
mov r8d, 0x80
mov dword [rbx + 0x204], 0xd3a3b879
mov dword [rbx + 0x208], 0x3f6d12f7
mov dword [rbx + 0x20c], 0x7515a235
mov dword [rbx + 0x210], 0xa4e7f123
call fcn.1800795c0
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r15
repne scasb al, byte [rdi]
lea rdx, [rsp + 0xc0]
not rcx
lea r8, [rcx - 1]
mov rcx, r15
call qword [sym.imp.USER32.dll_CharToOemBuffA]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r15
lea rdx, [0x180114f80]
mov r8d, 0x100
repne scasb al, byte [rdi]
not rcx
lea r14, [rcx - 1]
lea rcx, [rbx + 0x104]
call fcn.1800785c0
xor r13d, r13d
movsxd r12, r14d
mov ebp, r13d
lea rdx, [0x180000000]
nop word [rax + rax]
mov r10d, r13d
mov r11, r13
test r14d, r14d
jle 0x180051e72
nop
movzx eax, byte [rsp + r11 + 0xc0]
mov r9d, 1
sub eax, ebp
movzx ecx, al
movzx eax, byte [rsp + r11 + 0xc1]
movzx r8d, byte [rdx + rcx*4 + 0x118ad0]
add eax, ebp
movzx ecx, al
movzx esi, byte [rdx + rcx*4 + 0x118ad0]
cmp r8d, esi
je 0x180051e61
nop dword [rax + rax]
movzx ecx, byte [r8 + rbx + 0x104]
lea eax, [r9 + r8]
inc r9d
add eax, r10d
movzx edi, al
movzx eax, byte [rdi + rbx + 0x104]
mov byte [r8 + rbx + 0x104], al
lea eax, [r8 + 1]
mov byte [rdi + rbx + 0x104], cl
movzx r8d, al
cmp r8d, esi
jne 0x180051e20
lea rdx, [0x180000000]
add r11, 2
add r10d, 2
cmp r11, r12
jl 0x180051de0
inc ebp
cmp ebp, 0x100
jl 0x180051dd0
test r14d, r14d
jle 0x18005239f
lea esi, [r14 - 1]
lea rdi, [rsp + 0xc0]
shr esi, 4
inc esi
nop word [rax + rax]
mov rdx, rdi
mov rcx, rbx
call fcn.180051440
add rdi, 0x10
sub rsi, 1
jne 0x180051ea0
jmp 0x18005239f
movzx r12d, byte [rsp + 0x3c8]
xor r13d, r13d
lea r8, [0x18011c310]
mov r9d, r13d
lea r11, [0x180000000]
nop word [rax + rax]
movsxd r10, r9d
mov rdi, r15
imul r10, r10, 0xaa
lea rax, [r10 + r11 + 0x11c290]
sub rdi, rax
nop dword [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + rdi]
sub edx, ecx
jne 0x180051f12
inc rax
test ecx, ecx
jne 0x180051f00
test edx, edx
jne 0x180051f3e
test rsi, rsi
jne 0x180051f22
cmp byte [r8], r13b
je 0x180051f34
jmp 0x180051f3e
cmp byte [r8], r13b
je 0x180051f3e
mov rax, qword [r10 + r11 + 0x11c311]
cmp rax, qword [rsi]
jne 0x180051f3e
cmp byte [r8 + 9], r12b
je 0x1800520e0
inc r9d
add r8, 0xaa
cmp r9d, 4
jb 0x180051ee0
lea rax, [rsp + 0x250]
or r9d, 0xffffffff
mov r8, r15
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x7f
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov word [rsp + 0x34e], r13w
lea rdi, [rsp + 0x250]
mov rdx, r13
nop dword [rax + rax]
movzx eax, byte [rdi]
movzx ecx, word [rdi]
mov byte [rsp + rdx*2 + 0x140], al
movzx eax, cx
shr ax, 8
mov byte [rsp + rdx*2 + 0x141], al
test cx, cx
je 0x180051fc0
inc rdx
add rdi, 2
cmp rdx, 0x1000000
jl 0x180051f90
mov ecx, r13d
lea rax, [rsp + 0x250]
cmp word [rsp + 0x250], cx
je 0x180051fec
nop word [rax + rax]
add rax, 2
inc ecx
cmp word [rax], r13w
jne 0x180051fe0
lea ebp, [rcx + rcx]
test rsi, rsi
je 0x180052005
mov rax, qword [rsi]
movsxd rcx, ebp
add ebp, 8
mov qword [rsp + rcx + 0x140], rax
mov eax, ebp
mov dword [rsp + 0x60], 0x67452301
mov dword [rsp + 0x64], 0xefcdab89
shr eax, 0x1d
mov dword [rsp + 0x68], 0x98badcfe
mov dword [rsp + 0x6c], 0x10325476
mov dword [rsp + 0x70], 0xc3d2e1f0
mov ecx, r13d
mov edx, r13d
mov dword [rsp + 0x34], eax
mov r14d, r13d
lea r15d, [rbp*8]
nop word [rax + rax]
mov r9d, edx
add edx, r15d
shr r9d, 3
mov dword [rsp + 0x74], edx
and r9d, 0x3f
cmp edx, r15d
jae 0x180052069
inc ecx
add ecx, eax
lea eax, [r9 + rbp]
mov dword [rsp + 0x78], ecx
cmp eax, 0x3f
jbe 0x18005212b
mov edi, 0x40
lea rcx, [rsp + r9 + 0x7c]
lea rdx, [rsp + 0x140]
sub edi, r9d
mov r8d, edi
call fcn.1800785c0
lea rdx, [rsp + 0x7c]
lea rcx, [rsp + 0x60]
movzx r8d, r12b
call fcn.180055cf0
lea esi, [rdi + 0x3f]
cmp esi, ebp
jae 0x1800520d3
lea rdx, [rsp + rdi + 0x140]
lea rcx, [rsp + 0x60]
movzx r8d, r12b
call fcn.180055cf0
add esi, 0x40
add edi, 0x40
cmp esi, ebp
jb 0x1800520b3
mov ecx, dword [rsp + 0x78]
mov edx, dword [rsp + 0x74]
mov r9d, r13d
jmp 0x18005212e
movsxd rcx, r9d
lea r8, [rbx + 0x21f]
lea r9, [rbx + 0x22f]
imul rcx, rcx, 0xaa
mov rax, qword [rcx + r11 + 0x11c270]
mov qword [r8], rax
mov rax, qword [rcx + r11 + 0x11c278]
mov qword [r8 + 8], rax
mov rax, qword [rcx + r11 + 0x11c280]
mov qword [r9], rax
mov rax, qword [rcx + r11 + 0x11c288]
mov qword [r9 + 8], rax
jmp 0x180052392
mov edi, r13d
cmp ebp, edi
jbe 0x180052157
mov eax, edi
mov r8d, ebp
lea rdx, [rsp + rax + 0x140]
mov eax, r9d
sub r8d, edi
lea rcx, [rsp + rax + 0x7c]
call fcn.1800785c0
mov ecx, dword [rsp + 0x78]
mov edx, dword [rsp + 0x74]
mov r9d, edx
add edx, 0x18
mov eax, r14d
sar eax, 8
shr r9d, 3
mov byte [rsp + 0x30], r14b
mov byte [rsp + 0x31], al
mov eax, r14d
and r9d, 0x3f
sar eax, 0x10
mov dword [rsp + 0x74], edx
mov byte [rsp + 0x32], al
cmp edx, 0x18
jae 0x18005218d
inc ecx
mov dword [rsp + 0x78], ecx
lea eax, [r9 + 3]
cmp eax, 0x3f
jbe 0x1800521f8
mov edi, 0x40
lea rcx, [rsp + r9 + 0x7c]
lea rdx, [rsp + 0x30]
sub edi, r9d
mov r8d, edi
call fcn.1800785c0
lea rdx, [rsp + 0x7c]
lea rcx, [rsp + 0x60]
movzx r8d, r12b
call fcn.180055cf0
lea esi, [rdi + 0x3f]
cmp esi, 3
jae 0x1800521ee
nop dword [rax + rax]
lea rdx, [rsp + rdi + 0x30]
lea rcx, [rsp + 0x60]
movzx r8d, r12b
call fcn.180055cf0
add esi, 0x40
add edi, 0x40
cmp esi, 3
jb 0x1800521d0
mov r9d, r13d
cmp edi, 3
jae 0x180052218
jmp 0x1800521fb
mov edi, r13d
mov eax, edi
mov r8d, 3
lea rdx, [rsp + rax + 0x30]
mov eax, r9d
sub r8d, edi
lea rcx, [rsp + rax + 0x7c]
call fcn.1800785c0
mov eax, r14d
cdq
and edx, 0x3fff
add eax, edx
mov edi, eax
and eax, 0x3fff
sar edi, 0xe
cmp eax, edx
jne 0x18005226f
lea rcx, [rsp + 0xc0]
lea rdx, [rsp + 0x60]
mov r8d, 0x5c
call fcn.1800785c0
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0xc0]
movzx r8d, r12b
call fcn.180057190
movzx eax, byte [rsp + 0x58]
movsxd rdx, edi
mov byte [rdx + rbx + 0x22f], al
inc r14d
cmp r14d, 0x40000
jge 0x18005228c
mov ecx, dword [rsp + 0x78]
mov edx, dword [rsp + 0x74]
mov eax, dword [rsp + 0x34]
jmp 0x180052050
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x60]
movzx r8d, r12b
call fcn.180057190
mov r15, qword [rsp + 0x38]
lea rdx, [rbx + 0x220]
nop dword [rax + rax]
mov ecx, dword [rsp + r13*4 + 0x48]
inc r13
add rdx, 4
mov eax, ecx
mov byte [rdx - 5], cl
shr eax, 8
mov byte [rdx - 4], al
mov eax, ecx
shr ecx, 0x18
shr eax, 0x10
cmp r13, 4
mov byte [rdx - 2], cl
mov byte [rdx - 3], al
jl 0x1800522b0
movsxd rdi, dword [0x18011c11c]
lea r10, [0x180000000]
mov rax, rdi
mov rdx, rdi
imul rax, rax, 0xaa
imul rdx, rdx, 0xaa
sub rax, r15
lea rcx, [rax + r10 + 0x11c290]
nop dword [rax + rax]
movzx eax, byte [r15]
inc r15
mov byte [rcx + r15 - 1], al
test al, al
jne 0x180052310
mov rcx, qword [rsp + 0x40]
test rcx, rcx
setne al
mov byte [rdx + r10 + 0x11c310], al
cmp al, 1
jne 0x180052342
mov rax, qword [rcx]
mov qword [rdx + r10 + 0x11c311], rax
mov byte [rdx + r10 + 0x11c319], r12b
lea r8, [rbx + 0x21f]
lea r9, [rbx + 0x22f]
mov rax, qword [r8]
mov qword [rdx + r10 + 0x11c270], rax
mov rax, qword [r8 + 8]
mov qword [rdx + r10 + 0x11c278], rax
mov rax, qword [r9]
mov qword [rdx + r10 + 0x11c280], rax
mov rax, qword [r9 + 8]
mov qword [rdx + r10 + 0x11c288], rax
lea eax, [rdi + 1]
and eax, 3
mov dword [0x18011c11c], eax
mov edx, 1
mov rcx, rbx
call fcn.18004fed0
mov r13, qword [rsp + 0x368]
mov r12, qword [rsp + 0x370]
mov rdi, qword [rsp + 0x378]
mov rbp, qword [rsp + 0x3b0]
mov r14, qword [rsp + 0x360]
mov rcx, qword [rsp + 0x350]
xor rcx, rsp
call fcn.180076a70
add rsp, 0x380
pop r15
pop rsi
pop rbx
ret