joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401395
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6b0
push esi
push edi
push 0x407cd8
mov edi, ecx
push dword [ebp + 0x10]
mov dword [ebp - 8], edi
call sub.MSVCRT.dll_strcpy
push 0x104
lea eax, [ebp - 0x2b0]
push 0
push eax
call sub.MSVCRT.dll_memset
push edi
call sub.MSVCRT.dll_strlen
inc eax
push eax
lea eax, [ebp - 0x2b0]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x24
lea eax, [ebp - 0x1ac]
push 0x407100
push 0x4070fc
push str._s_s
push eax
call esi
lea eax, [ebp - 0x1ac]
push 5
push eax
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.MSVCRT.dll_strncat]
add esp, 0x1c
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x401438
xor al, al
jmp 0x4014e1
push ebx
lea eax, [ebp - 0x11c]
mov ebx, 0x4070f8
push eax
push ebx
push edi
mov edi, str._s_s_s
lea eax, [ebp - 0x6b0]
push edi
push eax
call esi
add esp, 0x14
push dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x6b0]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call fcn.004014e7
test al, al
je 0x401479
mov bl, 1
jmp 0x4014d5
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
je 0x4014d3
lea eax, [ebp - 0x11c]
push eax
push ebx
push dword [ebp - 8]
lea eax, [ebp - 0x6b0]
push edi
push eax
call esi
lea eax, [ebp - 0x11c]
push 0x4070ec
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x1c
test eax, eax
je 0x401479
lea eax, [ebp - 0x11c]
push 0x4070e8
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x401479
jmp 0x401459
xor bl, bl
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov al, bl
pop ebx
pop edi
pop esi
leave
ret 0xc

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
mov byte [ebp + 0xb], bl
je 0x401588
push esi
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov esi, eax
lea eax, [esi + 3]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
lea eax, [esi + 1]
push eax
push ebx
push edi
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 8], ebx
push ebx
push eax
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push dword [ebp + 0xc]
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
push edi
call esi
pop ecx
test eax, eax
pop ecx
je 0x401575
push dword [ebp + 0x10]
push edi
call esi
pop ecx
test eax, eax
pop ecx
je 0x401575
push edi
push dword [ebp + 0x14]
call sub.MSVCRT.dll_strcpy
pop ecx
mov byte [ebp + 0xb], 1
pop ecx
push edi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
mov al, byte [ebp + 0xb]
pop ebx
leave
ret 0x10
Function at 0x401590
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
push 0x407108
lea eax, [ebp - 0x70]
push 0x407104
push eax
mov dword [ebp - 8], 0x64
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0xd4]
push 0x64
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x138]
push 0x64
push eax
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
mov eax, dword [ebp - 4]
leave
ret
Function at 0x403a43
Capabilities:
Delete file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
push ebx
push esi
mov ebx, 0x407464
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
push ebx
push str.x2.dat
call edi
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x403b8b
push 0x407800
push esi
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, 0x3ff
lea eax, [ebp - 0x40c]
push esi
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [ebp - 0x40c]
push 0x4074b4
push 0x4077f4
push str.c:windows_s_s.exe
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x80c]
push esi
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 0x80c]
push 0x4077dc
push eax
call edi
pop ecx
mov dword [ebp - 4], eax
test eax, eax
pop ecx
je 0x403b80
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push eax
call esi
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push dword [ebp - 4]
mov dword [ebp - 8], eax
call esi
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll_malloc]
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
push dword [ebp - 8]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
add esp, 0x30
lea eax, [ebp - 0x40c]
push 0x80
push eax
call esi
lea eax, [ebp - 0x40c]
push ebx
push eax
call edi
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x403b61
push edi
push dword [ebp - 8]
push 1
push dword [ebp - 0xc]
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push dword [ebp - 0xc]
call dword [sym.imp.MSVCRT.dll_free]
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
lea eax, [ebp - 0x40c]
pop ecx
push 2
push eax
call esi
push str.x2.dat
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4041d5
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor edi, edi
mov ecx, edx
push edi
mov edx, dword [ebp + 8]
push edi
call fcn.00403e94
mov esi, eax
cmp esi, edi
jne 0x404268
cmp dword [ebp + 0x14], edi
je 0x404268
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push dword [ebp + 8]
mov esi, 0x80004005
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404268
lea eax, [ebp - 0xc]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp + 8]
push 2
push eax
push ebx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
lea eax, [ebp + 8]
push 2
push 0x4078e4
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
mov esi, eax
neg esi
push ebx
sbb esi, esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
mov dword [ecx], eax
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x404299
Capabilities:
Encode data using xor
Hash data using crc32b

Disassembly:
push ebx
push esi
push edi
xor edi, edi
mov esi, 0x4086bc
mov dl, 8
mov ecx, edi
call fcn.00404271
shl eax, 0x18
push 8
mov dword [esi], eax
pop edx
mov ebx, eax
mov eax, ebx
mov ecx, eax
and ecx, 0x80000000
neg ecx
sbb ecx, ecx
add eax, eax
and ecx, 0x4c11db7
xor ecx, eax
dec edx
mov ebx, ecx
jne 0x4042b6
mov dl, 0x20
mov dword [esi], ebx
call fcn.00404271
mov dword [esi], eax
add esi, 4
inc edi
cmp esi, 0x408ab8
jle 0x4042a3
pop edi
pop esi
pop ebx
ret

Function at 0x4042ee
Capabilities:
Encode data using xor

Disassembly:
or eax, 0xffffffff
test edx, edx
je 0x404316
push esi
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x4086bc]
xor eax, esi
inc ecx
dec edx
jne 0x4042f7
pop edi
pop esi
not eax
ret
Function at 0x405530
Capabilities:
Create process on windows

Disassembly:
push 0
push ecx
call dword [sym.imp.KERNEL32.DLL_WinExec]
ret

Function at 0x40553a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2908
call fcn.00405740
lea eax, [ebp - 0x130]
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
push edi
push str.32.d
push 0x407cbc
push 0x4072ac
push str._s_s_sll
push eax
call esi
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.MSVCRT.dll__strlwr]
push 0x3e7
lea eax, [ebp - 0x9c8]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x24
lea eax, [ebp - 0xcc]
push str.el32.dl
push 0x407960
push str._sn_sl
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x68]
push str.tModuleFileNa
push str.Ge_smeA
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
add esp, 0xc
lea eax, [ebp - 0xcc]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
lea ecx, [ebp - 0x68]
push ecx
push eax
call ebx
lea ecx, [ebp - 0x9c8]
push 0x3e8
push ecx
push 0
call eax
lea eax, [ebp - 0x130]
push eax
call edi
lea eax, [ebp - 0x1f8]
push str.c:d45.bat
push eax
call esi
and dword [ebp - 4], 0
lea eax, [ebp - 0x5e0]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0xc
test eax, eax
jbe 0x40563f
mov eax, dword [ebp - 4]
mov cl, byte [ebp + eax - 0x9c8]
mov byte [ebp + eax - 0x5e0], cl
inc eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x5e0]
push eax
call sub.MSVCRT.dll_strlen
cmp dword [ebp - 4], eax
pop ecx
jb 0x405618
lea eax, [ebp - 0x68]
push str.user32.dll
push eax
call esi
pop ecx
lea eax, [ebp - 0xcc]
pop ecx
push str.rToOe
push str.Cha_smA
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x68]
push eax
call edi
lea ecx, [ebp - 0xcc]
push ecx
push eax
call ebx
lea ecx, [ebp - 0x5e0]
push ecx
lea ecx, [ebp - 0x9c8]
push ecx
call eax
lea eax, [ebp - 0x1f8]
push eax
lea eax, [ebp - 0x5e0]
push 0x407c84
push eax
lea eax, [ebp - 0x5e0]
push str.if_exist
push eax
push str.:TYU
push str.EM_s5efd
push 0x407c60
lea eax, [ebp - 0x2908]
push str._s_ss434f356
push eax
call esi
lea eax, [ebp - 0x1f8]
push 0x407464
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x30
test edi, edi
je 0x405701
lea eax, [ebp - 0x2908]
push edi
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x2908]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea eax, [ebp - 0x1f8]
push eax
push str.md__k
lea eax, [ebp - 0xdb0]
push str.c_s__s
push eax
call esi
add esp, 0x10
lea ecx, [ebp - 0x1f8]
call fcn.00405530
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408916
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x426b10]
jne 0x408920
repz ret
jmp fcn.004142e1

Function at 0x4099e0
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004052fe
and dword [ebp - 4], 0
cmp dword [0x427fb4], 0
mov ebx, eax
jne 0x409a91
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x409b42
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x409b42
push eax
call fcn.0040528c
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x427fb4], eax
call esi
push eax
call fcn.0040528c
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x427fb8], eax
call esi
push eax
call fcn.0040528c
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x427fbc], eax
call esi
push eax
call fcn.0040528c
pop ecx
mov dword [0x427fc4], eax
test eax, eax
je 0x409a91
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040528c
pop ecx
mov dword [0x427fc0], eax
mov eax, dword [0x427fc0]
cmp eax, ebx
je 0x409ae9
cmp dword [0x427fc4], ebx
je 0x409ae9
push eax
call fcn.00405307
push dword [0x427fc4]
mov esi, eax
call fcn.00405307
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x409ae9
test edi, edi
je 0x409ae9
call esi
test eax, eax
je 0x409ae0
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x409ae0
test byte [ebp - 0xc], 1
jne 0x409ae9
or dword [ebp + 0x10], 0x200000
jmp 0x409b22
mov eax, dword [0x427fb8]
cmp eax, ebx
je 0x409b22
push eax
call fcn.00405307
pop ecx
test eax, eax
je 0x409b22
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x409b22
mov eax, dword [0x427fbc]
cmp eax, ebx
je 0x409b22
push eax
call fcn.00405307
pop ecx
test eax, eax
je 0x409b22
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x427fb4]
call fcn.00405307
pop ecx
test eax, eax
je 0x409b42
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x409b44
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x3010f365
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x30024a78]
jne 0x3010fc0f
ret
push ebp
mov ebp, esp
sub esp, 0x328
mov dword [0x301f8e00], eax
mov dword [0x301f8dfc], ecx
mov dword [0x301f8df8], edx
mov dword [0x301f8df4], ebx
mov dword [0x301f8df0], esi
mov dword [0x301f8dec], edi
mov word [0x301f8e18], ss
mov word [0x301f8e0c], cs
mov word [0x301f8de8], ds
mov word [0x301f8de4], es
mov word [0x301f8de0], fs
mov word [0x301f8ddc], gs
pushfd
pop dword [0x301f8e10]
mov eax, dword [ebp]
mov dword [0x301f8e04], eax
mov eax, dword [ebp + 4]
mov dword [0x301f8e08], eax
lea eax, [ebp + 8]
mov dword [0x301f8e14], eax
mov eax, dword [ebp - 0x320]
mov dword [0x301f8d50], 0x10001
mov eax, dword [0x301f8e08]
mov dword [0x301f8d04], eax
mov dword [0x301f8cf8], 0xc0000409
mov dword [0x301f8cfc], 1
mov eax, dword [0x30024a78]
mov dword [ebp - 0x328], eax
mov eax, dword [0x301b5908]
mov dword [ebp - 0x324], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x301f8d48], eax
push 1
call sub.MSVCR80.dll__crt_debugger_hook
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x30024a98
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x301f8d48], 0
jne 0x3010fcff
push 1
call sub.MSVCR80.dll__crt_debugger_hook
pop ecx
push 0xc0000409
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
leave
ret
Function at 0x4010d5
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
push esi
push edi
push 0x44
pop edi
push edi
xor esi, esi
lea eax, [ebp - 0x94]
push esi
push eax
call fcn.0040f990
mov ebx, dword [ebp + 8]
add esp, 0xc
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x94]
push eax
push esi
push esi
push 0x4000020
push esi
push esi
mov dword [ebp - 0x94], edi
mov edi, dword [ebp + 0xc]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401161
push 0x3c
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.0040f990
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], 0x3c
mov dword [ebp - 0x3c], 0x40
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x401166
mov eax, dword [ebp - 8]
jmp 0x401168
mov eax, dword [ebp - 0x50]
jmp 0x401168
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40116d
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SOFTWAREIntelDisplayigfxcuihkcmd
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4011d2
push 4
pop eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push str.ExpansionAllDisplay
push dword [ebp - 4]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4011c9
cmp dword [ebp - 8], 1
jne 0x4011c9
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret
Function at 0x404459
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
sub esp, 0x120
lea ebp, [esp - 4]
mov eax, dword [0x429730]
xor eax, ebp
mov dword [ebp + 0x120], eax
push 0x20
mov eax, 0x41f9b5
call fcn.0041017e
mov edi, dword [ebp + 0x12c]
mov esi, 0x104
xor ebx, ebx
push esi
lea eax, [ebp + 0x1c]
push ebx
push eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], esi
call fcn.0040f990
add esp, 0xc
push ebx
lea ecx, [ebp]
mov byte [ebp - 0xd], 1
mov dword [ebp + 0x18], 0xf
call fcn.00401435
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0x1c]
push eax
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov dword [ebp - 4], ebx
jmp 0x404537
cmp byte [ebp - 0xd], bl
je 0x4044f1
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp]
call fcn.00401cad
mov byte [ebp - 0xd], bl
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 1
jne 0x40451c
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp]
call fcn.00401cad
inc dword [ebp - 0x14]
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
push dword [ebp - 0x24]
call edi
test eax, eax
je 0x4044d1
mov eax, dword [ebp - 0x14]
cmp dword [0x42abd8], eax
jne 0x40455e
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x404554
lea eax, [ebp + 4]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push ebx
push 1
lea ecx, [ebp]
call fcn.004014e1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x120]
xor ecx, ebp
call fcn.0040fa0a
add ebp, 0x124
leave
ret 4
Function at 0x406dde
Capabilities:
Set registry value

Disassembly:
push 4
lea eax, [esp + 0xc]
push eax
push 4
push 0
push dword [esp + 0x14]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
ret 8

Function at 0x406e2c
Capabilities:
Set registry value

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x10]
mov ebx, ecx
test esi, esi
jne 0x406e3d
push 0xd
pop eax
jmp 0x406e67
push edi
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
add esi, eax
add edi, eax
cmp eax, 1
jne 0x406e40
push edi
push dword [esp + 0x18]
push 7
push 0
push dword [esp + 0x20]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
pop ebx
ret 8

Function at 0x407a09
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x9c]
sub esp, 0x11c
mov eax, dword [0x429730]
xor eax, ebp
mov dword [ebp + 0x98], eax
mov eax, dword [ebp + 0xa4]
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 4]
or ecx, 0x2001f
push ecx
push eax
push dword [edi]
xor esi, esi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
call fcn.00406d9d
mov ebx, eax
cmp ebx, esi
je 0x407a79
lea ecx, [ebp - 0x70]
call fcn.00406d28
mov eax, ebx
mov ecx, dword [ebp + 0x98]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040fa0a
add ebp, 0x9c
leave
ret 4
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
jmp 0x407a91
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x70]
call fcn.00407a09
cmp eax, esi
jne 0x407ac3
lea eax, [ebp - 0x80]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x68]
push eax
push esi
push dword [ebp - 0x70]
mov dword [ebp - 0x74], 0x100
call ebx
test eax, eax
je 0x407a81
lea ecx, [ebp - 0x70]
call fcn.00406d28
push dword [ebp - 0x78]
mov ecx, edi
call fcn.00406ccd
lea ecx, [ebp - 0x70]
mov esi, eax
call fcn.00406d28
mov eax, esi
jmp 0x407a5f
Function at 0x40a8d7
Capabilities:
Get keyboard layout
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push esi
push edi
lea eax, [ebp - 0x78]
push eax
push 0x1e
xor edi, edi
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx esi, ax
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
cmp si, ax
jne 0x40a91f
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx edx, ax
xor ecx, ecx
lea eax, [ebp + ecx*4 - 0x78]
cmp dx, word [eax]
jne 0x40a917
mov edi, dword [eax]
inc ecx
cmp ecx, 0x1e
jl 0x40a90c
jmp 0x40a932
xor ecx, ecx
lea eax, [ebp + ecx*4 - 0x78]
cmp si, word [eax]
jne 0x40a92c
mov edi, dword [eax]
inc ecx
cmp ecx, 0x1e
jl 0x40a921
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x40a938
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
push ebp
lea ebp, [esp - 0x98]
sub esp, 0x118
mov eax, dword [0x429730]
xor eax, ebp
mov dword [ebp + 0x94], eax
mov eax, dword [ebp + 0xa4]
or dword [ebp - 0x78], 0xffffffff
push edi
mov edi, dword [ebp + 0xa0]
mov dword [ebp - 0x80], eax
test edi, edi
je 0x40aa0e
push ebx
push esi
push 1
push edi
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
and dword [ebp - 0x74], 0
mov esi, 0x428b48
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x70]
push 0
push eax
call fcn.0040f990
lea eax, [esi + 4]
push eax
push dword [ebp - 0x80]
call fcn.004115b1
add esp, 0x14
test eax, eax
je 0x40aa06
mov eax, dword [esi]
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0040a8b2
pop ecx
push edi
push 0
push dword [ebp - 0x7c]
call dword [sym.imp.USER32.dll_MapVirtualKeyExA]
mov ecx, dword [ebp - 0x74]
shl eax, 0x10
add ecx, 0xfffffff1
or eax, 1
cmp ecx, 3
ja 0x40a9d8
or eax, 0x1000000
push ebx
lea ecx, [ebp - 0x70]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetKeyNameTextA]
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x80]
call fcn.004115b1
pop ecx
pop ecx
test eax, eax
je 0x40aa06
inc dword [ebp - 0x74]
add esi, 0x18
cmp esi, 0x429178
jl 0x40a988
jmp 0x40aa0c
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x78], eax
pop esi
pop ebx
push 1
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov ecx, dword [ebp + 0x94]
mov eax, dword [ebp - 0x78]
xor ecx, ebp
pop edi
call fcn.0040fa0a
add ebp, 0x98
leave
ret
Function at 0x40aa38
Capabilities:
Get geographical location
Get keyboard layout
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x429730]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push esi
mov dword [ebp - 0x24], esi
call fcn.0040a8d7
push eax
call fcn.0040a938
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x40ab7d
push edi
push esi
xor edi, edi
push edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
call fcn.0040a938
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x40ab7c
push ebx
push 9
pop esi
push esi
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.0040f990
push esi
lea eax, [ebp - 0x1c]
push edi
push eax
call fcn.0040f990
push edi
push str._04x
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.00411485
add esp, 0x28
push esi
lea eax, [ebp - 0x1c]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
mov edi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov ebx, 0x3ff
and eax, ebx
push eax
call edi
test eax, eax
je 0x40ab0a
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.00410ebd
add esp, 0xc
push 1
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.USER32.dll_LoadKeyboardLayoutA]
test eax, eax
je 0x40ab0a
push dword [ebp - 0x24]
push eax
call fcn.0040a938
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x40ab7b
push esi
lea eax, [ebp - 0x10]
push 0
push eax
call fcn.0040f990
push esi
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.0040f990
push 0
push str._04x
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.00411485
add esp, 0x28
push esi
lea eax, [ebp - 0x1c]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
and eax, ebx
push eax
call edi
test eax, eax
je 0x40ab7b
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.00410ebd
add esp, 0xc
push 1
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.USER32.dll_LoadKeyboardLayoutA]
test eax, eax
je 0x40ab7b
push dword [ebp - 0x24]
push eax
call fcn.0040a938
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
pop ebx
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
xor ecx, ebp
pop esi
call fcn.0040fa0a
leave
ret