Function at 0x10001320
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10008bf6
mov eax, dword fs:[0]
push eax
sub esp, 0x364
mov eax, dword [0x1000e008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x118]
mov ebx, dword [ebp + 0xc]
push 0x104
push 0
push eax
mov dword [ebp - 0x330], edi
call sub.VCRUNTIME140.dll_memset
mov ecx, ebx
mov dword [ebp - 0x334], 0x104
add esp, 0xc
mov dword [ebp - 0x368], 0
xor eax, eax
mov dword [ebp - 0x330], 3
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 7
lea edx, [ecx + 2]
mov word [ebp - 0x34c], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100013b0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x34c]
call fcn.10001e00
push str.SoftwareHNCSharedHancomDocsAccounts
lea ecx, [ebp - 0x34c]
mov dword [ebp - 4], 0
call fcn.10001f50
cmp dword [ebp - 0x338], 8
lea ecx, [ebp - 0x368]
push ecx
push 0x20019
lea eax, [ebp - 0x34c]
cmovae eax, dword [ebp - 0x34c]
push 0
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1000182c
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x330]
push eax
push 0
push 0x1000a3ac
push dword [ebp - 0x368]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x368]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x1000182c
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x338]
cmp edx, 8
jb 0x100014a0
mov ecx, dword [ebp - 0x34c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10001496
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10001496
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10007d1e
add esp, 8
push 0x208
lea eax, [ebp - 0x320]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x320]
push eax
push ebx
call fcn.100018c0
test al, al
je 0x10001873
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [ebp - 0x324]
mov dword [ebp - 0x324], 0
push eax
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x32c], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x10001873
lea eax, [ebp - 0x328]
push eax
push 0
push 0
push 0x8004
push dword [ebp - 0x324]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x10001557
mov eax, dword [ebp - 0x324]
test eax, eax
je 0x10001546
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 0x324], 0
push 0x1000a350
mov ecx, edi
call fcn.10001d60
jmp 0x10001894
lea ecx, [ebp - 0x320]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10001560
sub ecx, edx
sar ecx, 1
push 0
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x320]
push eax
push dword [ebp - 0x328]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x100015a9
mov eax, dword [ebp - 0x328]
test eax, eax
je 0x10001529
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov dword [ebp - 0x328], 0
jmp 0x10001529
lea eax, [ebp - 0x32c]
push eax
push 4
push dword [ebp - 0x328]
push 0x6610
push dword [ebp - 0x324]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x100015ea
mov eax, dword [ebp - 0x32c]
test eax, eax
je 0x1000158c
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0x32c], 0
jmp 0x1000158c
mov ebx, dword [ebp - 0x334]
xorps xmm0, xmm0
push ecx
push ebx
lea ecx, [ebp - 0x340]
movq qword [ebp - 0x340], xmm0
mov dword [ebp - 0x338], 0
call fcn.10001c20
mov dword [ebp - 4], 1
mov esi, dword [ebp - 0x340]
test ebx, ebx
je 0x1000164c
test esi, esi
jne 0x1000163b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
jmp 0x1000164c
push ebx
lea eax, [ebp - 0x118]
push eax
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x36c]
mov dword [ebp - 0x36c], ebx
push eax
push esi
push 0
push 1
push 0
push dword [ebp - 0x32c]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x10001712
mov eax, dword [ebp - 0x32c]
test eax, eax
je 0x1000168f
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0x32c], 0
mov eax, dword [ebp - 0x328]
test eax, eax
je 0x100016aa
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov dword [ebp - 0x328], 0
mov eax, dword [ebp - 0x324]
test eax, eax
je 0x100016c7
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 0x324], 0
push 0x1000a350
mov ecx, edi
call fcn.10001d60
test esi, esi
je 0x10001894
mov ecx, dword [ebp - 0x338]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x10001703
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10001703
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.10007d1e
add esp, 8
jmp 0x10001894
mov eax, dword [ebp - 0x36c]
mov dword [ebp - 0x354], 0
mov dword [ebp - 0x350], 7
mov byte [esi + eax], 0
xor eax, eax
mov ebx, dword [ebp - 0x36c]
add ebx, esi
mov word [ebp - 0x364], ax
mov eax, ebx
sub eax, esi
cmp eax, 7
jbe 0x1000176d
mov byte [ebp - 0x330], 0
lea ecx, [ebp - 0x364]
push dword [ebp - 0x330]
push eax
call fcn.100024b0
mov dword [ebp - 0x354], 0
push dword [ebp - 0x330]
lea ecx, [ebp - 0x364]
push ebx
push esi
call fcn.10002400
mov eax, dword [ebp - 0x32c]
test eax, eax
je 0x1000179b
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0x32c], 0
mov eax, dword [ebp - 0x328]
test eax, eax
je 0x100017b6
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov dword [ebp - 0x328], 0
mov eax, dword [ebp - 0x324]
test eax, eax
je 0x100017d3
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 0x324], 0
lea eax, [ebp - 0x364]
mov ecx, edi
push eax
call fcn.10001d20
mov edx, dword [ebp - 0x350]
cmp edx, 8
jb 0x100016d3
mov ecx, dword [ebp - 0x364]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1000181d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1000181d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10007d1e
add esp, 8
jmp 0x100016d3
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x338]
cmp edx, 8
jb 0x10001873
mov ecx, dword [ebp - 0x34c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10001869
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100016fd
push edx
push ecx
call fcn.10007d1e
add esp, 8
mov dword [edi + 0x10], 0
xor eax, eax
push 0
mov dword [edi + 0x14], 7
mov ecx, edi
push 0x1000a350
mov word [edi], ax
call fcn.10001e00
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10007cd8
mov esp, ebp
pop ebp
ret 8