joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100328a
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x1008464]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
cmp esi, edi
mov dword [ebp - 0x418], eax
je 0x100335d
cmp word [esi], di
je 0x100335d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10033d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0xb7
cmp eax, ecx
jne 0x10032e2
mov eax, ecx
jmp 0x100335f
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp word [ebp - 0x412], 0x3a
push 2
lea esi, [ebp - 0x414]
pop ebx
jne 0x100330e
lea esi, [ebp - 0x40e]
jmp 0x10033bb
push 0x5c
pop ecx
cmp word [ebp - 0x412], cx
jne 0x100336e
mov eax, dword [ebp - 0x410]
cmp ax, di
lea esi, [ebp - 0x410]
je 0x100335d
cmp ax, cx
je 0x100333a
add esi, ebx
mov ax, word [esi]
cmp ax, di
jne 0x100332b
cmp word [esi], di
je 0x100335d
add esi, ebx
mov ax, word [esi]
cmp ax, di
je 0x100335d
cmp ax, cx
je 0x1003358
add esi, ebx
mov ax, word [esi]
cmp ax, di
jne 0x1003349
cmp word [esi], di
jne 0x10033b9
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100637b
leave
ret 8
cmp word [ebp - 0x414], cx
jne 0x10033bb
lea esi, [ebp - 0x412]
jmp 0x10033bb
cmp word [esi], 0x5c
je 0x1003392
add esi, ebx
cmp word [esi], di
jne 0x100337f
cmp word [esi], 0x5c
jne 0x10033bb
push edi
lea eax, [ebp - 0x414]
push eax
mov word [esi], di
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10033b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x100335d
mov word [esi], 0x5c
add esi, ebx
cmp word [esi], di
jne 0x100337f
push dword [ebp - 0x418]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x10033dc
xor eax, eax
inc eax
jmp 0x100335f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0xb7
sub eax, ecx
neg eax
sbb eax, eax
and eax, 0xffffff49
add eax, ecx
jmp 0x100335f
Function at 0x10034c7
Capabilities:
Check if file exists
Copy file
Get file attributes
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1008464]
mov ecx, dword [ebp + 0xc]
and dword [ebp - 0x418], 0
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
lea edx, [ebp - 0x41c]
push edx
push 0x2001f
push 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x100351c
mov dword [ebp - 0x418], 1
jmp 0x1003621
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x424]
push eax
push 0
push esi
push dword [ebp - 0x41c]
mov dword [ebp - 0x420], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x100355d
mov dword [ebp - 0x418], 1
jmp 0x1003615
cmp dword [ebp + 0x1c], 0
lea eax, [ebp - 0x20c]
je 0x10035ad
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1003615
push edi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.01003473
test eax, eax
je 0x1003615
push 0
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x10035db
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x1001810
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.01003473
test eax, eax
je 0x1003615
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x414]
push eax
xor edi, edi
inc edi
push edi
push 0
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1003615
mov dword [ebp - 0x418], edi
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x418]
pop edi
pop esi
pop ebx
call fcn.0100637b
leave
ret 0x18

Function at 0x100369e
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10036ba
test al, 0x10
je 0x10036ba
xor eax, eax
inc eax
jmp 0x10036bc
xor eax, eax
pop ebp
ret 4

Function at 0x10036c5
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10036e1
test al, 0x10
jne 0x10036e1
xor eax, eax
inc eax
jmp 0x10036e3
xor eax, eax
pop ebp
ret 4
Function at 0x10038c6
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x13b4
call fcn.01006660
mov eax, dword [0x1008464]
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x13a4], eax
je 0x1003923
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupGetLineCountW]
test eax, eax
mov dword [ebp - 0x1398], eax
jle 0x1003923
lea eax, [ebp - 0x1390]
push eax
push 0x2001f
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x100392a
xor eax, eax
jmp 0x1003a14
and dword [ebp - 0x1394], 0
cmp dword [ebp - 0x1398], 0
jle 0x1003a05
lea eax, [ebp - 0x13b4]
push eax
push dword [ebp - 0x1394]
push dword [ebp - 0x13a4]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexW]
test eax, eax
je 0x10039ed
push 1
lea eax, [ebp - 0x13b4]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov esi, eax
test esi, esi
je 0x10039ed
push 2
lea eax, [ebp - 0x13b4]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov edi, eax
test edi, edi
je 0x10039ed
lea eax, [ebp - 0x139c]
push eax
lea eax, [ebp - 0x138c]
push eax
lea eax, [ebp - 0x13a0]
push eax
push 0
push esi
push dword [ebp - 0x1390]
mov dword [ebp - 0x139c], 0x1388
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10039ed
push dword [ebp - 0x139c]
lea eax, [ebp - 0x138c]
push eax
push dword [ebp - 0x13a0]
push 0
push edi
push dword [ebp - 0x1390]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x10039ed
push esi
push dword [ebp - 0x1390]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
inc dword [ebp - 0x1394]
mov eax, dword [ebp - 0x1394]
cmp eax, dword [ebp - 0x1398]
jl 0x100393e
push dword [ebp - 0x1390]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100637b
leave
ret 0x10
Function at 0x1003a28
Capabilities:
Check if file exists
Get file attributes
Move file
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x854
mov eax, dword [0x1008464]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, 0xffffffff
mov dword [ebp - 0x83c], eax
jne 0x1003a53
xor eax, eax
jmp 0x1003c05
push 0x100181c
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineCountW]
cmp eax, esi
mov dword [ebp - 0x830], eax
jle 0x1003c03
mov dword [ebp - 0x828], esi
jbe 0x1003c00
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, 0x104
lea eax, [ebp - 0x850]
push eax
push dword [ebp - 0x828]
push 0x100181c
push dword [ebp - 0x83c]
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexW]
test eax, eax
je 0x1003be6
push 1
lea eax, [ebp - 0x850]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x834], eax
je 0x1003be6
push 2
lea eax, [ebp - 0x850]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x840], eax
je 0x1003be6
push 3
lea eax, [ebp - 0x850]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov ebx, eax
test ebx, ebx
je 0x1003be6
lea eax, [ebp - 0x82c]
push eax
push 0x20019
push 0
push 0x1001710
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003be6
push dword [ebp - 0x834]
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x838]
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x854]
push eax
push 0
lea eax, [ebp - 0x824]
push eax
push dword [ebp - 0x82c]
mov dword [ebp - 0x838], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1003bda
push esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x61c]
push eax
call edi
push esi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push eax
call edi
push esi
push dword [ebp - 0x840]
lea eax, [ebp - 0x20c]
push eax
call fcn.01002a62
push esi
push ebx
lea eax, [ebp - 0x414]
push eax
call fcn.01002a62
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1003bda
test al, 0x10
je 0x1003bda
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push dword [ebp - 0x82c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x828]
mov eax, dword [ebp - 0x828]
cmp eax, dword [ebp - 0x830]
jb 0x1003a86
pop edi
pop ebx
xor esi, esi
inc esi
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
call fcn.0100637b
leave
ret 4
Function at 0x1003c17
Capabilities:
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x858
mov eax, dword [0x1008464]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, 0xffffffff
mov dword [ebp - 0x844], eax
jne 0x1003c42
xor eax, eax
jmp 0x1003e38
push 0x100185c
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineCountW]
cmp eax, esi
mov dword [ebp - 0x840], eax
jle 0x1003e36
mov dword [ebp - 0x82c], esi
jbe 0x1003e33
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
push edi
mov edi, 0x104
lea eax, [ebp - 0x854]
push eax
push dword [ebp - 0x82c]
push 0x100185c
push dword [ebp - 0x844]
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexW]
test eax, eax
je 0x1003e19
push 1
lea eax, [ebp - 0x854]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x838], eax
je 0x1003e19
push 2
lea eax, [ebp - 0x854]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x830], eax
je 0x1003e19
push 3
lea eax, [ebp - 0x854]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov ebx, eax
test ebx, ebx
je 0x1003e19
push 4
lea eax, [ebp - 0x854]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x834], eax
je 0x1003e19
lea eax, [ebp - 0x828]
push eax
push 0x2001f
push 0
push 0x1001710
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003e19
push dword [ebp - 0x838]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x83c]
push eax
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x858]
push eax
push 0
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x828]
mov dword [ebp - 0x83c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1003e0d
lea eax, [ebp - 0x824]
push eax
push dword [ebp - 0x830]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1003e0d
push 0x1001858
push dword [ebp - 0x834]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x1003de9
push edi
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x830]
call esi
push edi
lea eax, [ebp - 0x61c]
push eax
push ebx
call esi
push 4
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.USERENV.dll_Ordinal_112]
test eax, eax
je 0x1003de9
lea eax, [ebp - 0x414]
push eax
call fcn.01002f27
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 2
push 0
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x828]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x828]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x82c]
mov eax, dword [ebp - 0x82c]
cmp eax, dword [ebp - 0x840]
jb 0x1003c75
pop edi
pop ebx
xor esi, esi
inc esi
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
call fcn.0100637b
leave
ret 4
Function at 0x100410b
Capabilities:
Enumerate files on windows
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x880
mov eax, dword [0x1008464]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, 0xffffffff
jne 0x1004130
xor eax, eax
jmp 0x10042b4
lea ecx, [ebp - 0x880]
push ecx
push 0x208
lea ecx, [ebp - 0x61c]
push ecx
push 0x10018e0
push 0x10018d4
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupGetLineTextW]
test eax, eax
je 0x10042b2
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x61c]
push eax
call ebx
mov dword [ebp - 0x874], eax
lea eax, [ebp - 0x414]
push eax
push 1
call fcn.01002f8a
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01002ae0
mov dword [ebp - 0x878], eax
lea eax, [ebp - 0x414]
push eax
call fcn.01002ae0
push 0x10016d0
push dword [ebp - 0x878]
mov dword [ebp - 0x87c], eax
call esi
lea eax, [ebp - 0x86c]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x870], eax
je 0x10042ae
push edi
test byte [ebp - 0x86c], 0x10
je 0x1004286
lea eax, [ebp - 0x840]
push eax
call ebx
cmp eax, dword [ebp - 0x874]
jbe 0x1004286
sub eax, dword [ebp - 0x874]
lea edi, [ebp + eax*2 - 0x840]
lea eax, [ebp - 0x61c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1004286
lea eax, [ebp - 0x840]
push eax
push dword [ebp - 0x878]
call esi
and word [edi], 0
lea eax, [ebp - 0x840]
push eax
push dword [ebp - 0x87c]
call esi
push 4
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.USERENV.dll_Ordinal_112]
test eax, eax
je 0x1004286
lea eax, [ebp - 0x20c]
push eax
call fcn.01002f27
lea eax, [ebp - 0x86c]
push eax
push dword [ebp - 0x870]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1004205
push dword [ebp - 0x870]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
xor esi, esi
inc esi
pop ebx
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
call fcn.0100637b
leave
ret 4
Function at 0x10042c6
Capabilities:
Check if file exists
Get file attributes
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x1008464]
and dword [ebp - 0x418], 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x41c], eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp + 8]
call fcn.01002f8a
test eax, eax
je 0x1004317
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 8]
call fcn.01002f8a
test eax, eax
jne 0x100431e
xor eax, eax
jmp 0x10043d9
test edi, edi
push esi
mov esi, 0x104
je 0x100434a
cmp word [edi], 0
je 0x100434a
push esi
push edi
lea eax, [ebp - 0x414]
push eax
call fcn.01002a62
push esi
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01002a62
push esi
push ebx
lea eax, [ebp - 0x414]
push eax
call fcn.01002a62
push esi
push dword [ebp - 0x41c]
lea eax, [ebp - 0x20c]
push eax
call fcn.01002a62
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edi, 0x10018f0
push edi
lea eax, [ebp - 0x414]
push eax
call esi
push edi
lea eax, [ebp - 0x20c]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x414]
push eax
call esi
cmp eax, 0xffffffff
je 0x10043d2
test al, 0x10
jne 0x10043d2
lea eax, [ebp - 0x20c]
push eax
call esi
cmp eax, 0xffffffff
jne 0x10043d2
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x10043d2
mov dword [ebp - 0x418], 1
mov eax, dword [ebp - 0x418]
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.0100637b
leave
ret 0x10

Function at 0x10043ec
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x1008464]
and dword [ebp - 0x418], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 8]
call fcn.01002f8a
lea eax, [ebp - 0x414]
push eax
push dword [ebp + 8]
call fcn.01002f8a
mov esi, 0x104
push esi
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01002a62
push esi
push ebx
lea eax, [ebp - 0x414]
push eax
call fcn.01002a62
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
pop edi
pop esi
pop ebx
je 0x1004497
test al, 0x10
je 0x1004497
push 4
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.USERENV.dll_Ordinal_112]
test eax, eax
je 0x1004497
lea eax, [ebp - 0x20c]
push eax
call fcn.01002f27
mov dword [ebp - 0x418], 1
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x418]
call fcn.0100637b
leave
ret 0xc
Function at 0x1004655
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x1008464]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [sym.imp.msvcrt.dll_wcsstr]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x420], eax
mov eax, dword [ebp + 0x14]
push 0x1001930
push ebx
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x1004740
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x420]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1004756
mov edi, dword [sym.imp.msvcrt.dll__wcsupr]
push ebx
call edi
lea eax, [ebp - 0x20c]
push eax
call edi
lea eax, [ebp - 0x20c]
push eax
push ebx
call esi
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1004756
cmp esi, ebx
jne 0x1004756
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x20c]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esi + eax*2]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x418]
push dword [ebp - 0x41c]
call fcn.010045c3
test eax, eax
je 0x1004756
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call edi
lea eax, [esi + eax*2]
push eax
call ebx
jmp 0x1004751
push ebx
push dword [ebp - 0x418]
push edi
call fcn.010045c3
test eax, eax
je 0x1004756
xor eax, eax
inc eax
jmp 0x1004758
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100637b
leave
ret 0x10
Function at 0x100476c
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1008464]
and dword [ebp - 0x418], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x41c], eax
mov esi, 0x208
push esi
lea eax, [ebp - 0x414]
push eax
push 0
push ebx
call edi
test eax, eax
jne 0x100480b
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x10047e7
push dword [ebp - 0x41c]
push dword [ebp - 0x420]
call fcn.0100476c
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x418]
push esi
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x418]
push ebx
call edi
test eax, eax
je 0x10047b1
cmp dword [ebp - 0x418], 0
jne 0x1004879
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x424], esi
push eax
xor esi, esi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueW]
test eax, eax
jne 0x1004879
cmp word [ebp - 0x20c], si
je 0x1004879
push 0x100195c
push 0x1001934
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x41c]
call fcn.01004655
test eax, eax
je 0x1004879
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
mov ecx, dword [ebp - 4]
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
call fcn.0100637b
leave
ret 8
Function at 0x10048ef
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x1008464]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
mov dword [ebp - 0x22c], eax
je 0x1004926
push 0x10019c8
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineCountW]
test eax, eax
mov dword [ebp - 0x224], eax
jg 0x100492d
xor eax, eax
jmp 0x1004ad9
and dword [ebp - 0x210], 0
test eax, eax
jle 0x1004ad6
push ebx
push esi
push edi
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 0x210]
push 0x10019c8
push dword [ebp - 0x22c]
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexW]
test eax, eax
je 0x1004abb
push 1
lea eax, [ebp - 0x240]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov ebx, eax
test ebx, ebx
je 0x1004abb
push 2
lea eax, [ebp - 0x240]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov esi, eax
test esi, esi
je 0x1004abb
push 4
lea eax, [ebp - 0x240]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x230], eax
je 0x1004abb
push 6
lea eax, [ebp - 0x240]
push eax
call sub.SETUPAPI.dll_pSetupGetField
test eax, eax
mov dword [ebp - 0x21c], eax
je 0x1004abb
push 3
lea eax, [ebp - 0x240]
push eax
call sub.SETUPAPI.dll_pSetupGetField
mov edi, eax
push 5
lea eax, [ebp - 0x240]
push eax
call sub.SETUPAPI.dll_pSetupGetField
lea eax, [ebp - 0x220]
push eax
push ebx
push str.HKEY_LOCAL_MACHINE
call fcn.01003142
test eax, eax
je 0x1004abb
lea eax, [ebp - 0x214]
push eax
push 0x2001f
push 0
push esi
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1004abb
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
push edi
push dword [ebp - 0x214]
mov dword [ebp - 0x228], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1004aaf
cmp dword [ebp - 0x218], 1
je 0x1004a6c
cmp dword [ebp - 0x218], 2
jne 0x1004aaf
push dword [ebp - 0x230]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x1004aaf
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp - 0x21c]
push dword [ebp - 0x218]
push 0
push edi
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x210]
mov eax, dword [ebp - 0x210]
cmp eax, dword [ebp - 0x224]
jl 0x100493f
pop edi
pop esi
pop ebx
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
call fcn.0100637b
leave
ret 4