joyce8/EMBER2024-capa huggingface dataset:
Function at 0x108d9f6
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [ebp + 0xc]
xor esi, esi
push eax
push esi
push dword [ebp + 8]
mov dword [edi], esi
mov dword [ebp + 0xc], esi
call sub.Secur32.dll_GetComputerObjectNameW
test al, al
jne 0x108da35
call fcn.01091f1e
mov ebx, eax
cmp ebx, 0x8007007a
je 0x108da35
push ebx
push 0xa71019a
call fcn.0108c503
jmp 0x108da8d
mov eax, dword [ebp + 0xc]
add eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x108da57
mov eax, 0x8007000e
push eax
mov ebx, eax
push 0xa79019a
jmp 0x108da75
lea eax, [ebp + 0xc]
push eax
push esi
push dword [ebp + 8]
call sub.Secur32.dll_GetComputerObjectNameW
test al, al
jne 0x108da7c
call fcn.01091f1e
mov ebx, eax
push ebx
push 0xa7f019a
call fcn.0108c503
jmp 0x108da82
mov dword [edi], esi
xor esi, esi
xor ebx, ebx
test esi, esi
je 0x108da8d
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 8

Function at 0x108db2d
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
lea eax, [ebp - 4]
xor esi, esi
push eax
push esi
push dword [ebp + 8]
mov dword [ebx], esi
mov dword [ebp - 4], esi
call edi
test eax, eax
jne 0x108db70
call fcn.01091f1e
mov dword [ebp + 0xc], eax
cmp eax, 0x800700ea
je 0x108db70
push eax
push 0xac7019a
call fcn.0108c503
jmp 0x108dbc5
mov eax, dword [ebp - 4]
add eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x108db90
mov eax, 0x8007000e
push eax
push 0xace019a
jmp 0x108dba9
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 8]
call edi
test eax, eax
jne 0x108dbb3
call fcn.01091f1e
push eax
push 0xad3019a
mov dword [ebp + 0xc], eax
call fcn.0108c503
jmp 0x108dbba
mov dword [ebx], esi
xor esi, esi
mov dword [ebp + 0xc], esi
test esi, esi
je 0x108dbc5
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x108e975
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x108e9c5
call fcn.01091f1e
push 0x800700cb
mov esi, eax
push esi
push 0x1195019a
push ebx
call fcn.0108c457
jmp 0x108ea26
cmp eax, esi
jb 0x108e9d6
mov eax, 0x8007006f
push eax
push 0x119a019a
jmp 0x108ea0d
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x108e9df
sub eax, edx
sar eax, 1
lea esi, [eax + 1]
lea eax, [esi + esi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi], eax
test eax, eax
jne 0x108ea16
mov eax, 0x8007000e
push eax
push 0x11a1019a
mov esi, eax
call fcn.0108c503
jmp 0x108ea26
lea ecx, [ebp - 0x20c]
push ecx
push esi
push eax
call fcn.0102dff2
xor esi, esi
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01077d0b
leave
ret 8

Function at 0x108f246
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x10d38cc], 0
jne 0x108f2cb
push esi
xor esi, esi
lea eax, [ebp - 0x118]
inc esi
push eax
mov dword [0x10d38cc], esi
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x108f296
call fcn.01091f1e
push eax
push 0x1636019a
jmp 0x108f2a9
cmp dword [ebp - 0x108], 2
je 0x108f2b0
push 0x4c7
push 0x163b019a
call fcn.0108c503
jmp 0x108f2ca
cmp dword [ebp - 0x114], 5
ja 0x108f2c4
jb 0x108f2ca
cmp dword [ebp - 0x110], 0
jbe 0x108f2ca
mov dword [0x10d38c8], esi
pop esi
mov ecx, dword [ebp - 4]
mov eax, dword [0x10d38c8]
xor ecx, ebp
call fcn.01077d0b
leave
ret

Function at 0x108f2e1
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x10d38d1], 0
jne 0x108f358
lea eax, [ebp - 0x118]
push eax
mov byte [0x10d38d1], 1
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x108f32e
call fcn.01091f1e
push eax
push 0x1682019a
jmp 0x108f341
cmp dword [ebp - 0x108], 2
je 0x108f348
push 0x4c7
push 0x1687019a
call fcn.0108c503
jmp 0x108f358
cmp dword [ebp - 0x114], 6
jb 0x108f358
mov byte [0x10d38d0], 1
mov ecx, dword [ebp - 4]
mov al, byte [0x10d38d0]
xor ecx, ebp
call fcn.01077d0b
leave
ret
Function at 0x108f3c7
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
push edi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x108f433
call fcn.01091f1e
mov edi, eax
push edi
push 0x17fa019a
jmp 0x108f4fd
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x108f456
call fcn.01091f1e
mov edi, eax
cmp edi, ebx
je 0x108f456
push edi
push 0x1802019a
jmp 0x108f4fd
lea eax, [ebp - 0x10]
push eax
push ebx
push 0xa
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x108f4ba
call fcn.01091f1e
mov edi, eax
cmp edi, 0x800703f0
jne 0x108f4b2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp eax, ebx
jne 0x108f492
call fcn.01091f1e
mov edi, eax
push edi
push 0x1814019a
jmp 0x108f4fd
lea ecx, [ebp - 0x10]
push ecx
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x108f4ba
call fcn.01091f1e
mov edi, eax
push edi
push 0x181c019a
jmp 0x108f4fd
push edi
push 0x1821019a
jmp 0x108f4fd
lea eax, [ebp - 0x18]
push eax
push 1
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
jne 0x108f4dc
call fcn.01091f1e
mov edi, eax
push edi
push 0x182a019a
jmp 0x108f4fd
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x108f504
call fcn.01091f1e
mov edi, eax
push edi
push 0x1833019a
call fcn.0108c503
jmp 0x108f50e
cmp dword [ebp - 0x1c], ebx
setne al
mov byte [esi], al
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], ebx
je 0x108f51e
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 0x18], ebx
je 0x108f528
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0x14], ebx
je 0x108f536
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01077d0b
leave
ret 4
Function at 0x108f924
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ebx, eax
cmp ebx, esi
jne 0x108f957
call fcn.01091f1e
mov edi, eax
push edi
push 0x1dc3019a
call fcn.0108c503
jmp 0x108fa2e
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x108f95d
sub eax, edx
sar eax, 1
lea edi, [eax + ebx + 2]
lea eax, [edi + edi]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x108f992
mov eax, 0x8007000e
push eax
mov edi, eax
push 0x1dcc019a
jmp 0x108fa18
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebx
ja 0x108fa02
test eax, eax
je 0x108fa02
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x108f9a7
sub eax, edx
push 0x5c
sar eax, 1
pop ecx
cmp cx, word [esi + eax*2 - 2]
je 0x108f9cb
push 0x1008b90
push edi
push esi
call fcn.0102e02c
push dword [ebp + 8]
push edi
push esi
call fcn.0102e02c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x108f9fe
call fcn.01091f1e
mov edi, eax
push edi
push 0x1de3019a
push esi
call fcn.0108c53e
jmp 0x108fa1d
xor edi, edi
jmp 0x108fa1d
call fcn.01091f1e
mov edi, eax
test edi, edi
jne 0x108fa12
mov edi, 0x8007006f
push edi
push 0x1dd6019a
call fcn.0108c503
test esi, esi
je 0x108fa28
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
jne 0x108fa35
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x108fb81
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [ebp + 8], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, 0x101b75c
jne 0x108fbac
mov edx, 0x101b750
push ecx
push edx
push eax
push 0x101b738
lea eax, [ebp - 0x20c]
push 0x208
push eax
call fcn.0108dbd4
add esp, 0x18
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01077d0b
leave
ret 0xc
Function at 0x108fbe8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
xor ebx, ebx
cmp byte [ebp + 0xc], bl
push esi
sete bl
and dword [eax], 0
push edi
mov edi, ebx
shl edi, 7
add edi, 0x10d38d8
cmp byte [ebx + 0x10d38d4], 0
jne 0x108fcdf
push 0x10
push 1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
jne 0x108fc36
call fcn.01091f1e
mov esi, eax
push esi
push 0x2041019a
jmp 0x108fc76
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x108fc53
call fcn.01091f1e
mov esi, eax
push esi
push 0x2049019a
jmp 0x108fc76
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x108fc7d
call fcn.01091f1e
mov esi, eax
test esi, esi
jne 0x108fc70
mov esi, 0x8007000d
push esi
push 0x2055019a
call fcn.0108c503
jmp 0x108fce6
push 0x101b77c
lea eax, [esi + 6]
push eax
call fcn.0108f8de
test eax, eax
je 0x108fc96
mov esi, 0x8007000d
jmp 0x108fce6
cmp byte [ebp + 0xc], 0
je 0x108fcb1
movzx eax, word [esi + 0x34]
push eax
movzx eax, word [esi + 0x36]
push eax
movzx eax, word [esi + 0x30]
push eax
movzx eax, word [esi + 0x32]
jmp 0x108fcc4
movzx eax, word [esi + 0x3c]
push eax
movzx eax, word [esi + 0x3e]
push eax
movzx eax, word [esi + 0x38]
push eax
movzx eax, word [esi + 0x3a]
push eax
push 0x101b764
push 0x40
push edi
call fcn.0102e3ff
add esp, 0x1c
xchg dword [ebp + 0xc], eax
mov byte [ebx + 0x10d38d4], 1
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x1092779
Capabilities:
Parse url

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
xor ebx, ebx
push 0x38
lea eax, [ebp - 0x44]
push ebx
push eax
mov dword [ebp - 8], ebx
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
xor eax, eax
add esp, 0xc
inc eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x48], 0x3c
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x10927bc
mov esi, dword [sym.imp.WININET.dll_InternetCrackUrlW]
sub eax, ecx
lea ecx, [ebp - 0x48]
push ecx
push ebx
sar eax, 1
push eax
push dword [ebp + 8]
call esi
test eax, eax
jne 0x10927f1
call fcn.01091f1e
mov edi, eax
push edi
push 0x4c701ca
jmp 0x1092915
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 8]
push eax
call fcn.010926d8
mov edi, eax
cmp edi, ebx
je 0x1092813
push edi
push 0x4d001ca
jmp 0x1092915
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 8]
push eax
call fcn.010926d8
mov edi, eax
cmp edi, ebx
je 0x1092835
push edi
push 0x4d301ca
jmp 0x1092915
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 8]
push eax
call fcn.010926d8
mov edi, eax
cmp edi, ebx
je 0x1092857
push edi
push 0x4d601ca
jmp 0x1092915
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
call fcn.010926d8
mov edi, eax
cmp edi, ebx
je 0x1092879
push edi
push 0x4d901ca
jmp 0x1092915
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x109287f
lea ecx, [ebp - 0x48]
push ecx
sub eax, edx
push SysReAllocString
sar eax, 1
push eax
push dword [ebp + 8]
call esi
test eax, eax
jne 0x10928af
call fcn.01091f1e
mov edi, eax
push edi
push 0x4e001ca
jmp 0x1092915
mov dword [ebp - 0xc], ebx
mov esi, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push esi
push ebx
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.WININET.dll_InternetCreateUrlW]
test eax, eax
jne 0x10928dc
call fcn.01091f1e
mov edi, eax
cmp edi, 0x8007007a
jne 0x10928f6
cmp esi, ebx
jne 0x10928f6
cmp esi, ebx
jne 0x10928fe
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x109290a
shr dword [ebp - 0xc], 1
jmp 0x10928b2
push edi
push 0x4fb01ca
jmp 0x1092915
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov dword [ebp - 4], ebx
xor edi, edi
jmp 0x109291a
mov edi, 0x8007000e
push edi
push 0x50801ca
call fcn.0108c503
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x40], ebx
je 0x109292a
push dword [ebp - 0x44]
call esi
cmp dword [ebp - 0x34], ebx
je 0x1092934
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x18], ebx
je 0x109293e
push dword [ebp - 0x1c]
call esi
cmp dword [ebp - 0x10], ebx
je 0x1092948
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 4], ebx
je 0x1092952
push dword [ebp - 4]
call esi
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x1093326
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x14]
xor ecx, ecx
push eax
mov dword [edi], ecx
push ecx
mov dword [ebx], ecx
mov dword [ebp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x1093362
mov eax, 0x8007000e
push eax
push 0x73f01a3
mov edi, eax
call fcn.0108c503
jmp 0x10933b3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp + 0x14]
push eax
push esi
push 0
push 1
push 0
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x109339d
call fcn.01091f1e
mov edi, eax
push edi
push 0x74c01a3
call fcn.0108c503
jmp 0x10933a8
mov eax, dword [ebp + 0x14]
mov dword [edi], esi
xor esi, esi
mov dword [ebx], eax
xor edi, edi
test esi, esi
je 0x10933b3
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0x14

Function at 0x1093bc0
Capabilities:
Hash data using sha1
Initialize hashing via wincrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0xf0000000
push 1
xor edi, edi
push 0x1012830
push edi
mov dword [esi], edi
push esi
mov dword [ebx], edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1093bfd
mov dword [esi], edi
call fcn.01091f1e
mov ebx, eax
push ebx
push 0xd2d01a3
jmp 0x1093c20
push ebx
push edi
push edi
push 0x8004
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x1093c27
mov dword [ebx], edi
call fcn.01091f1e
mov ebx, eax
push ebx
push 0xd3401a3
call fcn.0108c503
jmp 0x1093c29
xor ebx, ebx
cmp ebx, edi
je 0x1093c51
mov eax, dword [esi]
cmp eax, edi
je 0x1093c51
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
jne 0x1093c4f
call fcn.01091f1e
push ebx
push 0xd3f01a3
call fcn.0108c503
mov dword [esi], edi
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 8
Function at 0x1095513
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 0xc], 0
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 8]
push eax
push 0x40
push ebx
call fcn.010735c9
mov dword [ebp - 4], eax
test eax, eax
je 0x1095546
push eax
push 0x6f101a3
call fcn.0108c503
jmp 0x10955f7
push esi
push edi
mov edi, dword [ebp - 8]
jmp 0x10955a9
push ebx
push dword [ebp + 0xc]
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
lea eax, [ebp + 0x10]
push eax
push esi
push 0
push 1
push 0
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x10955d8
call fcn.01091f1e
cmp dword [ebp - 0xc], 0
mov dword [ebp - 4], eax
jne 0x10955cb
cmp eax, 0x800700ea
jne 0x10955cb
mov eax, esi
test edi, edi
je 0x1095595
mov byte [eax], 0
inc eax
dec edi
jne 0x109558e
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], 1
push edi
push 0
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x109554d
mov eax, 0x8007000e
push eax
mov dword [ebp - 4], eax
push 0x6fa01a3
jmp 0x10955d1
push eax
push 0x71601a3
call fcn.0108c503
jmp 0x10955ea
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
xor esi, esi
mov dword [eax], ecx
mov dword [ebp - 4], esi
test esi, esi
je 0x10955f5
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, dword [ebp - 4]
pop ebx
leave
ret 0x14
Function at 0x109e043
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x10d0640]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
or dword [esi], 0xffffffff
push edi
mov edi, dword [ebp + 0x10]
and dword [edi], 0
push esi
call fcn.0109ca05
test ebx, ebx
jne 0x109e0b6
mov ebx, 0xf6
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x101b418
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x109e09b
cmp eax, ebx
jae 0x109e09b
push 0x101e620
jmp 0x109e10d
mov eax, 0x80070002
push eax
push 0x4f70191
mov dword [ebp - 0x210], eax
call fcn.0108c503
jmp 0x109e1ff
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x109e124
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x109e0ca
sub eax, edx
sar eax, 1
lea ecx, [eax + 2]
mov eax, 0x104
cmp ecx, eax
jb 0x109e0fa
mov eax, 0x800700ce
push eax
mov dword [ebp - 0x210], eax
push 0x5030191
jmp 0x109e1f9
push 0x101e618
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0102dff2
push ebx
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.0102e02c
lea ebx, [ebp - 0x20c]
push ebx
push esi
call fcn.0109d306
mov dword [ebp - 0x210], eax
test eax, eax
je 0x109e140
push eax
push 0x50b0191
jmp 0x109e1f9
push 2
pop eax
jmp 0x109e163
call fcn.01091f1e
mov dword [ebp - 0x210], eax
cmp eax, 0xe0000100
jne 0x109e1cb
cmp dword [ebp - 0x218], 2
jne 0x109e1cb
xor eax, eax
inc eax
and dword [ebp - 0x214], 0
lea ecx, [ebp - 0x214]
push ecx
push eax
push 0
push ebx
mov dword [ebp - 0x218], eax
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileW]
mov dword [esi], eax
mov eax, dword [ebp - 0x214]
mov dword [edi], eax
cmp dword [esi], 0xffffffff
je 0x109e145
xor edi, edi
lea eax, [ebp - 0x228]
push eax
push edi
push edi
push edi
push edi
push edi
push 0x101e608
push esi
call fcn.0109d805
push edi
push edi
push ebx
push 1
push 0x3b2
push edi
push 0x536
push 0x191
call fcn.010a9a82
mov dword [ebp - 0x210], edi
jmp 0x109e1ff
mov ecx, dword [edi]
neg ecx
sbb ecx, ecx
and ecx, edi
push ecx
push 0
push ebx
push 1
push 0x3b3
push eax
push 0x526
push 0x191
call fcn.010a9a82
push dword [ebp - 0x210]
push 0x5270191
push ebx
call fcn.0108c53e
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x210]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01077d0b
leave
ret 0xc
Function at 0x10a0773
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
xor edi, edi
mov dword [eax], edi
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 8]
push eax
push edi
push ebx
push dword [ebp + 8]
call esi
cmp eax, edi
je 0x10a07bb
push eax
call fcn.01091ee9
mov esi, eax
push esi
push 0x5ab0197
push ebx
call fcn.0108c53e
jmp 0x10a083b
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp + 0xc], eax
cmp eax, edi
jne 0x10a07d9
mov esi, 0x8007000e
push esi
push 0x5b20197
jmp 0x10a081e
lea ecx, [ebp - 4]
push ecx
push eax
lea eax, [ebp - 8]
push eax
push edi
push ebx
push dword [ebp + 8]
call esi
cmp eax, edi
je 0x10a0803
push eax
call fcn.01091ee9
mov esi, eax
push esi
push 0x5b90197
push ebx
call fcn.0108c53e
jmp 0x10a082d
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0xc]
push dword [ebp + 0x10]
call fcn.0108e2b1
mov esi, eax
cmp esi, edi
je 0x10a0825
push esi
push 0x5bd0197
call fcn.0108c503
jmp 0x10a082d
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
cmp dword [ebp + 0xc], edi
je 0x10a083b
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10