joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1010941
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
je 0x10109ae
xor eax, eax
cmp ax, word [esi]
je 0x10109ae
push ebx
push edi
push esi
call fcn.0101138c
mov ebx, eax
test ebx, ebx
je 0x10109a9
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x101098a
mov ecx, 0x2000
test ecx, eax
je 0x101097e
inc edi
jmp 0x101098a
or eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop ebx
jmp 0x10109b8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
ret 4

Function at 0x1010a90
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x268
mov eax, dword [0x1023018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
push 0x24c
lea eax, [ebp - 0x250]
push edi
push eax
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x254], edi
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x258], edi
cmp ebx, edi
je 0x1010c08
xor eax, eax
cmp ax, word [ebx]
je 0x1010c08
push ebx
call fcn.01010524
test eax, eax
je 0x1010c08
cmp esi, edi
je 0x1010c08
push esi
push ebx
call fcn.0101420c
mov dword [ebp - 0x268], eax
cmp eax, edi
je 0x1010c00
push edi
push eax
call fcn.0101138c
mov dword [ebp - 0x264], eax
cmp eax, edi
je 0x1010c00
lea ecx, [ebp - 0x254]
push ecx
push eax
mov dword [ebp - 0x258], 1
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
je 0x1010be6
test byte [ebp - 0x254], 0x10
jne 0x1010bb0
lea eax, [ebp - 0x228]
push eax
push ebx
call fcn.0101420c
mov ebx, eax
test ebx, ebx
je 0x1010b8e
push ebx
call fcn.01010a78
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x1010b8e
mov dword [ebp - 0x258], ecx
jmp 0x1010b95
and dword [ebp - 0x258], 0
test ebx, ebx
je 0x1010ba1
push ebx
push 0
call edi
push eax
call esi
cmp dword [ebp - 0x258], 1
jne 0x1010bda
mov ebx, dword [ebp - 0x260]
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, 1
je 0x1010b5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x1010bda
and dword [ebp - 0x258], 0
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x268]
push 0
call edi
push eax
call esi
push dword [ebp - 0x264]
push 0
call edi
push eax
call esi
mov eax, dword [ebp - 0x258]
jmp 0x1010c12
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100b8c5
leave
ret 8
Function at 0x1010c28
Capabilities:
Copy file
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
xor ebx, ebx
test dword [ebp + 0x1c], 0xfffffff8
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
je 0x1010c51
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1010daf
xor eax, eax
inc eax
test dword [ebp + 0x1c], eax
je 0x1010c5c
mov dword [ebp - 0x10], eax
push ebx
push dword [ebp + 8]
call fcn.0101138c
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x1010dac
push esi
push edi
push ebx
push dword [ebp + 0xc]
call fcn.0101138c
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x1010d87
mov dword [ebp - 0xc], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x102373c
push dword [ebp - 0x10]
and dword [ebp - 4], 0
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
mov dword [ebp - 8], eax
test eax, eax
jne 0x1010d0c
test dword [ebp + 0x1c], 2
je 0x1010d06
call ebx
inc dword [ebp - 0xc]
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp - 0xc]
call fcn.010102d9
test eax, eax
je 0x1010d06
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0x1001ee0
push 0x4000000
push edi
call fcn.0100a7d5
add esp, 0x1c
cmp dword [ebp - 4], 0
jbe 0x1010c94
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1010c94
cmp dword [ebp - 8], 0
je 0x1010d85
test dword [ebp + 0x1c], 4
je 0x1010d85
push 0x80
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov dword [ebp - 8], eax
test eax, eax
jne 0x1010d85
call ebx
mov dword [ebp + 0x1c], 0x1f
test eax, eax
je 0x1010d3a
mov dword [ebp + 0x1c], eax
push dword [ebp + 0x1c]
mov esi, 0x2000000
push dword [ebp + 0xc]
push 0x1001e40
push esi
push edi
call fcn.0100a7d5
add esp, 0x14
push dword [ebp + 0xc]
call fcn.01010a78
test eax, eax
jne 0x1010d7c
call ebx
test eax, eax
jne 0x1010d69
push 0x1f
pop eax
push eax
push dword [ebp + 0xc]
push 0x1001de0
push esi
push edi
call fcn.0100a7d5
add esp, 0x14
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
cmp dword [ebp - 0x14], ebx
je 0x1010daa
push dword [ebp - 0x14]
push ebx
call esi
push eax
call edi
pop edi
pop esi
mov eax, dword [ebp - 8]
pop ebx
leave
ret 0x18
Function at 0x1010db9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
cmp dword [ebp + 8], ebx
je 0x1010e71
cmp dword [ebp + 0xc], ebx
je 0x1010e71
push esi
push edi
push ebx
push dword [ebp + 8]
call fcn.0101138c
mov esi, eax
mov dword [ebp + 8], esi
cmp esi, ebx
je 0x1010e31
push ebx
push dword [ebp + 0xc]
call fcn.0101138c
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x1010e31
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1010e13
push dword [ebp - 4]
call fcn.01010a78
mov eax, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, 2
push eax
push ebx
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp - 4]
push esi
call fcn.01010c28
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp + 0xc], eax
je 0x1010e53
push dword [ebp + 8]
push ebx
call edi
push eax
call esi
cmp dword [ebp - 4], ebx
je 0x1010e61
push dword [ebp - 4]
push ebx
call edi
push eax
call esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 8]
pop edi
pop esi
jmp 0x1010e7b
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
leave
ret 0x14
Function at 0x1011038
Capabilities:
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
push esi
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
cmp eax, esi
je 0x101112b
xor ecx, ecx
cmp cx, word [eax]
je 0x101112b
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x101112b
cmp cx, word [eax]
je 0x101112b
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
push esi
call edi
mov ebx, eax
cmp ebx, esi
je 0x1011112
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea eax, [ebx + ebx]
push eax
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x101111b
push eax
push ebx
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x10110fd
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call edi
test eax, eax
je 0x10110fd
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.01010fb3
push dword [ebp - 0xc]
mov dword [ebp - 4], eax
call edi
test eax, eax
je 0x10110df
cmp dword [ebp - 4], 0
jne 0x1011106
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov dword [ebp - 8], eax
cmp dword [ebp - 4], edi
je 0x1011106
push dword [ebp - 4]
push edi
call esi
push eax
call ebx
mov dword [ebp - 4], edi
jmp 0x1011106
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
push dword [ebp - 0xc]
push 0
call esi
push eax
call ebx
jmp 0x101111b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 4]
pop edi
pop ebx
jmp 0x1011135
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
leave
ret 0xc
Function at 0x101158e
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x1023018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
cmp esi, ebx
je 0x1011722
xor eax, eax
cmp ax, word [esi]
je 0x1011722
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.0101138c
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x101170b
push edi
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x1c], ebx
call fcn.0101136e
cmp eax, ebx
jl 0x101169f
cmp dword [ebp - 0x1c], 1
jne 0x101166a
mov eax, dword [ebp - 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1011604
mov ecx, dword [ebp - 0x14]
sub eax, edx
sar eax, 1
lea esi, [ecx + eax*2]
cmp dword [ebp - 0xc], ebx
je 0x101162e
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5c
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
mov esi, eax
pop ecx
push dword [ebp - 8]
cmp esi, ebx
je 0x10116df
xor eax, eax
mov word [esi], ax
call fcn.01010524
test eax, eax
jne 0x1011660
push ebx
push dword [ebp - 8]
call edi
push 0x5c
pop eax
mov word [esi], ax
inc esi
inc esi
jmp 0x1011634
mov esi, dword [ebp - 0x14]
movzx eax, word [esi]
cmp ax, 0x61
jb 0x101167c
cmp ax, 0x7a
jbe 0x1011688
cmp ax, 0x41
jb 0x101162e
cmp ax, 0x5a
ja 0x101162e
push 0x3a
pop eax
cmp ax, word [esi + 2]
jne 0x101162e
push 0x5c
pop eax
cmp ax, word [esi + 4]
jne 0x101162e
add esi, 8
jmp 0x101162e
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x10021c0
push 0x3000000
push 0x102373c
mov dword [ebp - 0x10], eax
call fcn.0100a7d5
add esp, 0x14
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
jmp 0x1011714
call fcn.01010524
xor esi, esi
inc esi
cmp eax, esi
je 0x1011706
push ebx
push dword [ebp - 8]
call edi
cmp eax, esi
je 0x1011706
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x20]
push 0x1002160
jmp 0x10116b6
mov dword [ebp - 0x18], esi
jmp 0x10116cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x18]
jmp 0x101172c
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0100b8c5
leave
ret 4
Function at 0x1012022
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x1023018]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
xor eax, eax
lea edi, [ebp - 0x21c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 1
lea eax, [ebp - 0x220]
push eax
push 0x1011803
push 0x1011f65
xor edi, edi
push ebx
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x210], edx
mov dword [ebp - 0x214], ecx
call fcn.01011b15
push esi
push ebx
mov dword [ebp - 0x224], eax
call fcn.010117c9
test eax, eax
jne 0x10120a8
inc dword [ebp - 0x21c]
cmp dword [ebp - 0x220], edi
jne 0x10120a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x21c], edi
jbe 0x1012155
push 0x204
lea eax, [ebp - 0x208]
push edi
push eax
mov dword [ebp - 0x20c], edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x10120ec
mov word [ebp - 0x20c], ax
xor eax, eax
lea ecx, [ebp - 0x20c]
cmp ax, word [ebp - 0x20c]
jne 0x1012102
mov ecx, 0x1002960
cmp dword [ebp - 0x21c], 1
mov eax, 0x100295c
jne 0x1012115
mov eax, 0x1001dd8
push ecx
push dword [ebp - 0x220]
push ebx
push eax
push dword [ebp - 0x21c]
push 0x1002898
push 0x4000000
push 0x102373c
call fcn.0100a7d5
add esp, 0x20
cmp dword [ebp - 0x220], edi
je 0x101214f
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x224], edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x224]
xor ecx, ebp
pop edi
call fcn.0100b8c5
leave
ret
Function at 0x10128f3
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
test esi, esi
jne 0x1012907
xor eax, eax
jmp 0x101292e
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
test eax, eax
je 0x101292c
push 0x43
pop ecx
shr eax, 2
test edi, edi
jne 0x101292c
test al, 1
jne 0x1012923
inc edi
mov word [esi], cx
inc ecx
shr eax, 1
cmp cx, 0x5a
jbe 0x1012917
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x1012da8
Capabilities:
Get disk information via ioctl

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
cmp dword [ebp + 8], edi
jne 0x1012dd0
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1012e51
lea eax, [ebp - 8]
push eax
call fcn.0101353d
push edi
push 0x80
push 3
push edi
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x1012e46
push ebx
push eax
call fcn.010125ec
mov esi, eax
cmp esi, edi
je 0x1012e57
xor ebx, ebx
inc ebx
cmp dword [ebp + 0x10], edi
jne 0x1012e1f
cmp dword [esi], ebx
je 0x1012e1f
push dword [ebp + 8]
call fcn.010126ad
test eax, eax
je 0x1012e22
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
cmp dword [ebp - 4], edi
jne 0x1012e46
cmp esi, edi
je 0x1012e46
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
push edi
push dword [ebp - 8]
call fcn.010135d9
mov eax, esi
pop edi
pop esi
leave
ret 0xc
push 0x38
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, edi
je 0x1012e22
push edi
lea eax, [ebp + 0x10]
push eax
push 0xc
lea eax, [ebp - 0x14]
push eax
push edi
push edi
push 0x2d1080
push dword [ebp + 8]
xor ebx, ebx
inc ebx
mov dword [ebp + 0x10], edi
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1012e22
mov eax, dword [ebp - 0x10]
mov dword [esi + 8], eax
cmp dword [ebp + 0xc], edi
je 0x1012e1f
cmp dword [ebp - 0xc], edi
jbe 0x1012e22
push edi
push eax
call fcn.01012cd0
cmp eax, edi
je 0x1012e22
xor edx, edx
cmp dword [eax + 4], edi
jbe 0x1012efd
lea ecx, [eax + 0x38]
cmp dword [ebp - 4], edi
jne 0x1012efd
mov ebx, dword [ebp - 0xc]
cmp ebx, dword [ecx + 0x10]
jne 0x1012ef1
mov ebx, dword [ecx]
mov dword [esi + 0x10], ebx
mov ebx, dword [ecx + 4]
mov dword [esi + 0x14], ebx
mov ebx, dword [ecx + 8]
mov dword [esi + 0x18], ebx
mov ebx, dword [ecx + 0xc]
mov dword [ebp - 4], 1
mov dword [esi + 0x1c], ebx
inc edx
add ecx, 0x90
cmp edx, dword [eax + 4]
jb 0x1012ec6
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1012e22
Function at 0x1012f8e
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1023018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x14]
push esi
xor eax, eax
cmp dword [ebp + 8], eax
push 0x41
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
pop esi
jl 0x1013064
cmp ebx, eax
je 0x1013064
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x101304f
push 0x3a
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
test byte [ebp - 0x20], 1
mov word [ebp - 0xc], si
mov word [ebp - 6], ax
je 0x101303d
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x101303d
push 0x5c
pop eax
push 0x2e
mov word [ebp - 0x1c], ax
mov word [ebp - 0x1a], ax
pop eax
push 0x5c
mov word [ebp - 0x18], ax
pop eax
push 0x3a
mov word [ebp - 0x16], ax
pop eax
push dword [ebp + 0x10]
mov word [ebp - 0x12], ax
push dword [ebp + 0xc]
xor eax, eax
push dword [ebp + 8]
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x1c]
push eax
mov word [ebp - 0x14], si
call fcn.01012f16
test eax, eax
jne 0x1013043
shr dword [ebp - 0x20], 1
inc esi
jmp 0x1012fca
mov word [ebx], si
mov dword [ebp - 0x24], 1
jmp 0x1013056
mov dword [ebp - 0x28], 0x490
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x24]
jmp 0x101306e
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0100b8c5
leave
ret 0x10

Function at 0x1013896
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x101392d
cmp dword [ebp + 0x18], esi
je 0x101392d
push edi
cmp dword [ebp + 0xc], esi
je 0x1013904
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0x20006
push esi
push 0x1002ff4
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
cmp edi, esi
jne 0x101391c
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x101391c
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp edi, esi
sete al
pop edi
jmp 0x1013937
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
leave
ret 0x18
Function at 0x1013941
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp eax, edi
jne 0x1013963
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
leave
ret 0xc
push esi
cmp dword [ebp + 0xc], edi
je 0x1013994
lea ecx, [ebp - 4]
push ecx
push 0x20019
push edi
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1013986
cmp dword [ebp - 4], edi
jne 0x1013997
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop esi
jmp 0x101395e
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], edi
je 0x10139b5
push edi
push edi
push edi
push edi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
neg esi
sbb esi, esi
inc esi
jmp 0x10139b8
xor esi, esi
inc esi
cmp dword [ebp + 0xc], edi
je 0x1013988
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1013988

Function at 0x1013a64
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
cmp eax, ebx
jne 0x1013a91
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
leave
ret 0x14
cmp dword [ebp + 0xc], ebx
je 0x1013ac3
lea ecx, [ebp - 4]
push ecx
push 0x20019
push ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x1013ab6
cmp dword [ebp - 4], ebx
jne 0x1013ac6
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
jmp 0x1013a8c
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x1013b61
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebp - 0x10]
jne 0x1013b5a
push dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1013b4f
lea ecx, [ebp - 0xc]
push ecx
push eax
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x1013b3d
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebp - 0x10]
jne 0x1013b36
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x1013b61
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
jmp 0x1013b61
mov dword [ebp + 8], 0xd
push dword [ebp - 8]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 8], ebx
jmp 0x1013b61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1013b61
mov dword [ebp + 8], 0xd
pop edi
pop esi
cmp dword [ebp + 0xc], ebx
je 0x1013b71
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 8]
jmp 0x1013ab6