joyce8/EMBER2024-capa huggingface dataset:
Function at 0x491680
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x4a9398]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x220], ecx
call fcn.00460000
mov dword [ebp - 4], 0x49749c
mov dword [ebp - 0xc], str.InstallDir
mov dword [ebp - 0x21c], 0x100
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
mov ecx, dword [ebp - 4]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x49171a
lea edx, [ebp - 0x21c]
push edx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x10]
push ecx
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x491714
lea ecx, [ebp - 0x218]
push ecx
push 0x4974e4
mov edx, dword [ebp + 8]
push edx
call fcn.004056c0
add esp, 0xc
jmp 0x491718
xor eax, eax
jmp 0x491728
jmp 0x49171e
xor eax, eax
jmp 0x491728
call fcn.0045efd0
mov eax, 1
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040806d
mov esp, ebp
pop ebp
ret 4
Function at 0x401000
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
push edi
push 0x103
lea eax, [ebp - 0x117]
push 0
push eax
mov byte [ebp - 0x118], 0
call sub.ntdll.dll_memset
xor eax, eax
mov byte [ebp - 0x14], 0
lea edi, [ebp - 0x13]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0xc
push 0x1c
stosb byte es:[edi], al
pop eax
mov dword [ebp - 4], 1
call sub.ntdll.dll__alloca_probe
mov eax, esp
test eax, eax
je 0x40105c
push 0x8b
push 0x1b
mov edx, 0x405d44
call fcn.0040295d
push 0x104
lea ecx, [ebp - 0x118]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4010ea
lea eax, [ebp - 0x118]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40107c
push 0x8003
lea ecx, [ebp - 0x14]
sub eax, edx
push ecx
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00401cce
test eax, eax
je 0x4010ea
xor al, al
lea edi, [ebp - 0x118]
mov ecx, 0x104
rep stosb byte es:[edi], al
lea eax, [ebp - 0x118]
lea edi, [ebp - 0x14]
call fcn.00401da3
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
test ax, ax
jne 0x4010ea
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
mov word [0x42a568], ax
test ax, ax
je 0x4010ea
and dword [ebp - 4], 0
mov eax, dword [ebp - 4]
lea esp, [ebp - 0x11c]
pop edi
leave
ret

Function at 0x4010f6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
push edi
mov esi, 0x103
xor ebx, ebx
push esi
lea eax, [ebp - 0x103]
push ebx
push eax
mov byte [ebp - 0x104], bl
call sub.ntdll.dll_memset
push esi
lea eax, [ebp - 0x207]
push ebx
push eax
mov byte [ebp - 0x208], bl
call sub.ntdll.dll_memset
add esp, 0x18
inc esi
push esi
lea eax, [ebp - 0x208]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
cmp eax, ebx
je 0x401158
mov byte [eax - 1], bl
lea eax, [ebp - 0x104]
push eax
push ebx
push ebx
call fcn.00402929
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
js 0x4011cb
lea eax, [ebp - 0x208]
push eax
lea ebx, [ebp - 0x104]
call fcn.0040271c
test eax, eax
je 0x4011c9
mov edi, ebx
call fcn.004027a8
test eax, eax
je 0x4011c9
mov eax, ebx
push eax
call fcn.00402898
test eax, eax
jne 0x4011ac
inc eax
mov dword [0x42a55c], eax
mov dword [0x42a564], eax
jmp 0x4011c9
push esi
lea eax, [ebp - 0x104]
push eax
push 0x42a570
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov dword [0x42a55c], 1
xor ebx, ebx
mov edi, 0x42a570
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4011d5
sub eax, edx
cmp eax, ebx
jne 0x4011eb
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012b4
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x117]
push ebx
push eax
mov byte [ebp - 0x118], bl
call sub.ntdll.dll_memset
xor eax, eax
mov byte [ebp - 0x14], bl
lea edi, [ebp - 0x13]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0xc
push 0x1c
stosb byte es:[edi], al
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, ebx
je 0x40130b
push 0x8b
push 0x1b
mov edx, 0x405d44
call fcn.0040295d
mov esi, 0x104
push esi
lea ecx, [ebp - 0x118]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4013b5
lea eax, [ebp - 0x118]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401330
push 0x8004
lea ecx, [ebp - 0x14]
sub eax, edx
push ecx
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00401cce
test eax, eax
je 0x4013b5
xor al, al
lea edi, [ebp - 0x118]
mov ecx, esi
rep stosb byte es:[edi], al
lea eax, [ebp - 0x118]
lea edi, [ebp - 0x14]
call fcn.00401da3
lea eax, [ebp - 0x21c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00402a47
mov ecx, 0x42a570
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x401398
push ecx
lea ecx, [ebp - 0x21c]
sub eax, esi
push ecx
call fcn.00402340
test eax, eax
je 0x4013b5
xor ebx, ebx
inc ebx
mov eax, ebx
lea esp, [ebp - 0x228]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4013c2
Capabilities:
Check os version
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push 0x11c
lea eax, [ebp - 0x158]
push 0
push eax
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0x158]
push eax
mov dword [ebp - 0x158], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x401454
cmp dword [ebp - 0x154], 6
jb 0x401454
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.00401ff5
cmp eax, 0x2000
jae 0x401454
call fcn.00401902
test eax, eax
jne 0x401454
push 6
push eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
js 0x401454
lea eax, [ebp - 0x3c]
call fcn.00401b43
test eax, eax
je 0x401446
lea edi, [ebp - 0x3c]
call fcn.00401c7b
test eax, eax
je 0x40143a
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
leave
ret
Function at 0x401456
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push 0x104
push 0x42a408
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call fcn.004020b1
call fcn.00401df8
mov dword [0x42a50c], eax
call fcn.0040262c
call fcn.004013c2
call section..text
test eax, eax
jne 0x4014ec
call fcn.004010f6
cmp dword [0x42a55c], esi
je 0x4014d2
call fcn.004012b4
test eax, eax
jne 0x4014d2
push 0x14
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, esi
je 0x4014cc
push 0x84
push 0x11
mov edx, 0x405d30
call fcn.0040295d
push eax
call fcn.00401eb6
call fcn.004011f0
cmp dword [0x42a55c], esi
je 0x4014ec
cmp dword [0x42a564], esi
jne 0x4014ec
call fcn.004023c0
cmp dword [0x42a560], esi
je 0x4014fc
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x401b43
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
push ebx
push esi
push edi
xor ebx, ebx
push 0x3c
mov esi, eax
push ebx
push esi
mov dword [ebp - 4], ebx
call sub.ntdll.dll_memset
add esp, 0xc
mov edi, 0x104
push edi
lea eax, [ebp - 0x424]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401c73
push edi
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleBaseNameW]
test eax, eax
je 0x401c73
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00401ace
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x401bbd
mov dword [ebp - 8], 0x4045a8
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x618
push 8
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov dword [ebp - 0xc], eax
test eax, eax
je 0x401c73
push dword [ebp - 8]
lea ecx, [ebp - 0x424]
push ecx
push 0x4045ac
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0x20a
push 8
call edi
push eax
call ebx
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x401c57
push ebx
push eax
push eax
push 0x25
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x401c57
push 0x4045d8
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x401c57
mov eax, dword [ebp - 0xc]
and dword [esi + 0x1c], 0
mov dword [ebp - 4], 1
mov dword [esi], 0x3c
mov dword [esi + 0xc], str.runas
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], eax
mov dword [esi + 4], 0x40
jmp 0x401c73
push dword [ebp - 0xc]
push 0
call edi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
test ebx, ebx
je 0x401c73
push ebx
push 0
call edi
push eax
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401c7b
Capabilities:
Create process on windows

Disassembly:
push ebx
push esi
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteExW]
xor ebx, ebx
jmp 0x401c9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x4c7
jne 0x401ca6
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call esi
test eax, eax
je 0x401c87
push 0xffffffffffffffff
push dword [edi + 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [edi + 0x38]
test eax, eax
je 0x401cc0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401cc9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
inc ebx
pop esi
mov eax, ebx
pop ebx
ret
Function at 0x401cce
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor esi, esi
push 4
xor ebx, ebx
pop edi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], edi
cmp dword [ebp + 8], esi
je 0x401d9a
cmp dword [ebp + 0xc], esi
je 0x401d9a
cmp dword [ebp + 0x10], esi
je 0x401d9a
push 0xf0000020
push 1
push esi
push esi
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x401d7d
cmp dword [ebp - 8], esi
je 0x401d7d
lea eax, [ebp - 4]
push eax
push esi
push esi
push dword [ebp + 0x14]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x401d7d
cmp dword [ebp - 4], esi
je 0x401d8b
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x401d7d
push esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
call edi
test eax, eax
je 0x401d7d
push esi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
push 2
push dword [ebp - 4]
call edi
test eax, eax
je 0x401d7d
inc ebx
cmp dword [ebp - 4], esi
je 0x401d8b
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [ebp - 8], esi
je 0x401d9a
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x10
Function at 0x401eb6
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
push edi
xor ebx, ebx
mov esi, 0x103
push esi
lea eax, [ebp - 0x20f]
push ebx
push eax
mov dword [ebp - 4], ebx
mov byte [ebp - 0x210], bl
call sub.ntdll.dll_memset
push esi
lea eax, [ebp - 0x10b]
push ebx
push eax
mov byte [ebp - 0x10c], bl
call sub.ntdll.dll_memset
add esp, 0x18
cmp dword [ebp + 8], ebx
je 0x401fe8
lea edi, [esi + 1]
push edi
lea eax, [ebp - 0x210]
push eax
push 0x42a570
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push 0x34
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x401f38
push 0x87
push 0x31
mov edx, 0x405210
call fcn.0040295d
lea ecx, [ebp - 4]
push ecx
push 0x20206
push ebx
push eax
mov esi, 0x80000001
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, 2
jne 0x401f62
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
cmp eax, ebx
jne 0x401fda
push 0x30
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, ebx
je 0x401f85
push 0x86
push 0x2d
mov edx, 0x4051e0
call fcn.0040295d
lea ecx, [ebp - 0x210]
push ecx
push eax
lea eax, [ebp - 0x10c]
push edi
push eax
call dword [sym.imp.ntdll.dll__snprintf]
lea eax, [ebp - 0x10c]
add esp, 0x10
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401fa7
sub eax, esi
inc eax
push eax
lea eax, [ebp - 0x10c]
push eax
push 1
push ebx
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x401fda
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
call fcn.00402164
cmp dword [ebp - 4], ebx
je 0x401fe8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esp, [ebp - 0x21c]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x402164
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
push 0x3c
xor edi, edi
pop eax
mov dword [ebp - 4], edi
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, edi
je 0x402190
push 0x96
push 0x3b
mov edx, 0x405a30
call fcn.0040295d
lea ecx, [ebp - 4]
push ecx
push 0xf003f
push edi
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jne 0x4021af
cmp dword [ebp - 4], edi
jne 0x4021b9
cmp eax, 2
je 0x4021b9
cmp eax, 5
jne 0x402219
push 4
pop eax
push 0x18
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
pop eax
mov dword [ebp - 8], edi
call sub.ntdll.dll__alloca_probe
mov esi, esp
cmp esi, edi
je 0x4021e6
push 0x8a
push 0x15
mov eax, esi
mov edx, 0x405a6c
call fcn.0040295d
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402219
cmp dword [ebp - 8], edi
je 0x402219
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
cmp dword [ebp - 4], edi
je 0x402227
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esp, [ebp - 0x18]
pop edi
pop esi
leave
ret

Function at 0x4022a9
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
push esi
xor esi, esi
mov dword [ebp - 4], ebx
cmp dword [ebp + 8], ebx
je 0x40232e
push 0x80000000
push dword [ebp + 8]
call fcn.00402250
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x40232e
push edi
xor eax, eax
mov dword [ebp - 0x10], ebx
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0xc], esi
cmp esi, ebx
je 0x402322
call fcn.00402ac3
mov edi, eax
mov dword [ebp - 4], edi
cmp edi, ebx
je 0x402322
push ebx
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x402322
mov esi, edi
call fcn.00402b12
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call fcn.00401e80
mov esi, dword [ebp - 0xc]
pop edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402337
mov dword [eax], esi
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 8

Function at 0x40239f
Capabilities:
Delete file
Set file attributes

Disassembly:
xor eax, eax
test edi, edi
je 0x4023bf
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call esi
test eax, eax
jne 0x4023be
push edi
call esi
pop esi
ret
Function at 0x40262c
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push edi
mov edi, 0x42a408
push edi
xor ebx, ebx
call esi
test eax, eax
je 0x40269c
push 0x14
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
test eax, eax
je 0x40266b
push 0x91
push 0x12
mov edx, 0x4059b0
call fcn.0040295d
push edi
push eax
lea eax, [ebp - 0x104]
push 0x104
push eax
call dword [sym.imp.ntdll.dll__snprintf]
add esp, 0x10
lea eax, [ebp - 0x104]
push eax
call esi
test eax, eax
je 0x40269c
lea edi, [ebp - 0x104]
call fcn.0040239f
mov ebx, eax
mov eax, ebx
lea esp, [ebp - 0x110]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4026a9
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push edi
push 3
xor edi, edi
call fcn.00402b46
add eax, 3
push eax
call fcn.00402a1d
mov ebx, eax
cmp ebx, edi
je 0x402716
push esi
lea eax, [ebp - 0x104]
push eax
push edi
push edi
call fcn.00402929
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
js 0x40270e
mov esi, 0x104
call fcn.00402ac3
mov edi, eax
test edi, edi
je 0x40270e
push edi
push 0xffffffffffffffff
call fcn.00402b46
push eax
push ebx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov esi, ebx
call fcn.00402b12
pop esi
mov eax, edi
pop edi
pop ebx
leave
ret

Function at 0x4027a8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp edi, ebx
je 0x40288c
push edi
push ebx
push ebx
push 0x23
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
js 0x40288c
push 4
pop eax
call sub.ntdll.dll__alloca_probe
mov esi, esp
cmp esi, ebx
je 0x4027f4
push 0x93
push 2
mov eax, esi
mov edx, 0x405a1c
call fcn.0040295d
push 0xffffffffffffffff
call fcn.00402b46
push eax
push esi
lea eax, [ebp - 0x104]
push 0x104
push eax
call dword [sym.imp.ntdll.dll__snprintf]
lea eax, [ebp - 0x104]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40281b
sub eax, edx
cmp eax, 6
jb 0x4027f4
cmp byte [ebp - 0x104], bl
je 0x402855
lea ecx, [ebp - 0x104]
movsx eax, byte [ecx]
lea edx, [eax - 0x30]
and edx, 0x80000001
jns 0x40284a
dec edx
or edx, 0xfffffffe
inc edx
je 0x402850
add al, 0x31
mov byte [ecx], al
inc ecx
cmp byte [ecx], bl
jne 0x402837
lea eax, [ebp - 0x104]
push eax
push edi
call fcn.00402a47
push 8
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, ebx
je 0x402881
push 0x8b
push 4
mov edx, 0x4055ec
call fcn.0040295d
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionA]
xor esi, esi
inc esi
mov eax, esi
lea esp, [ebp - 0x10c]
pop esi
pop ebx
leave
ret
Function at 0x402898
Capabilities:
Access pe header
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push edi
xor edi, edi
and dword [ebp - 4], edi
cmp dword [ebp + 8], edi
je 0x402922
push esi
push 0x104
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.004022a9
mov esi, eax
test esi, esi
je 0x402904
cmp dword [ebp - 4], edi
je 0x402904
push esi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov edi, eax
test edi, edi
je 0x402904
push 0xffffffffffffffff
call fcn.00402b46
push esi
push dword [ebp + 8]
mov dword [edi + 0x58], eax
mov eax, dword [ebp - 4]
call fcn.00402340
mov edi, eax
test edi, edi
jne 0x402918
push 1
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, eax
test esi, esi
je 0x402921
call fcn.00402b12
pop esi
mov eax, edi
pop edi
leave
ret 4

Function at 0x40295d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x40297e
mov esi, edx
mov ecx, eax
sub esi, eax
mov edx, edi
mov bl, byte [esi + ecx]
xor bl, byte [ebp + 0xc]
mov byte [ecx], bl
inc ecx
dec edx
jne 0x402972
xor edx, edx
mov byte [edi + eax], dl
cmp edi, edx
jbe 0x402a16
lea ebx, [edx + eax]
mov cl, byte [ebx]
cmp cl, 0x5c
jne 0x4029b8
lea edi, [edx + eax + 1]
cmp byte [edi], cl
je 0x402a01
cmp cl, cl
jne 0x4029b8
lea edi, [edx + eax + 1]
cmp byte [edi], 0x72
jne 0x4029b8
mov ecx, dword [ebp + 8]
sub ecx, edx
lea esi, [edx + eax + 2]
mov byte [ebx], 0xd
rep movsb byte es:[edi], byte [esi]
cmp byte [ebx], 0x5c
jne 0x402a0c
lea edi, [edx + eax + 1]
cmp byte [edi], 0x6e
jne 0x4029d4
mov ecx, dword [ebp + 8]
sub ecx, edx
lea esi, [edx + eax + 2]
mov byte [ebx], 0xa
rep movsb byte es:[edi], byte [esi]
cmp byte [ebx], 0x5c
jne 0x402a0c
lea edi, [edx + eax + 1]
cmp byte [edi], 0x74
jne 0x4029f0
mov ecx, dword [ebp + 8]
sub ecx, edx
lea esi, [edx + eax + 2]
mov byte [ebx], 9
rep movsb byte es:[edi], byte [esi]
cmp byte [ebx], 0x5c
jne 0x402a0c
lea edi, [edx + eax + 1]
cmp byte [edi], 0x22
jne 0x402a0c
mov byte [ebx], 0x22
mov ecx, dword [ebp + 8]
sub ecx, edx
lea esi, [edx + eax + 2]
rep movsb byte es:[edi], byte [esi]
inc edx
cmp edx, dword [ebp + 8]
jb 0x40298b
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x402ed4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, 0x4041a0
sub eax, eax
test esi, esi
je 0x402fac
sub eax, 1
test ecx, ecx
je 0x402faa
test esi, 3
je 0x402f12
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x402ef7
mov edx, ecx
and edx, 7
shr ecx, 3
je 0x402f91
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x402f1c
mov ecx, edx
test ecx, ecx
je 0x402faa
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x402f97
not eax
mov dword [esp + 0x1c], eax
popal
ret
Function at 0x1001cc9
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x1004004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x210], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
cmp esi, ebx
je 0x1001dce
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x210]
push eax
push 0x20019
push ebx
push 0x1001490
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1001dba
mov word [ebp - 6], ax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
push 0x1001484
push dword [ebp - 0x210]
mov dword [ebp - 0x214], 0x206
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1001dba
cmp dword [ebp - 0x218], 2
lea eax, [ebp - 0x20c]
jne 0x1001d9e
push dword [ebp + 0xc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x214], eax
jmp 0x1001dba
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1001dba
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
push esi
call fcn.01001926
cmp dword [ebp - 0x210], ebx
je 0x1001dce
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.01002ac1
leave
ret 8