joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4effe8
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov ecx, 5
push 0
push 0
dec ecx
jne 0x4efff0
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e94
xor eax, eax
push ebp
push 0x4f01aa
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.004eff8c
mov esi, eax
test esi, esi
je 0x4f017f
mov edi, dword [esi]
test edi, edi
jl 0x4f017f
inc edi
xor ebx, ebx
mov eax, dword [0x4fc398]
mov eax, dword [eax]
call fcn.00478308
mov eax, ebx
add eax, eax
cmp byte [esi + eax*8 + 8], 0x1c
jne 0x4f0177
mov eax, ebx
add eax, eax
mov eax, dword [esi + eax*8 + 4]
push eax
push 0
push 0x7a
call sub.kernel32.dll_OpenProcess
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x18]
call fcn.00409288
mov eax, dword [ebp - 0x18]
call fcn.00404ea4
push eax
call sub.kernel32.dll_OutputDebugStringA
cmp dword [ebp - 8], 0
jbe 0x4f0177
push 2
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
mov eax, ebx
add eax, eax
movzx eax, word [esi + eax*8 + 0xa]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_DuplicateHandle
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.004efc2c
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
call fcn.00408d20
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
call fcn.00404fe8
test eax, eax
jle 0x4f0165
mov eax, dword [0x5004f4]
mov eax, dword [eax + 0x30c]
mov eax, dword [eax + 0x22c]
call fcn.004438c0
mov dword [ebp - 0x14], eax
mov eax, ebx
add eax, eax
mov eax, dword [esi + eax*8 + 4]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x20]
call fcn.00409288
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
call fcn.00443360
lea edx, [ebp - 0x24]
mov eax, ebx
add eax, eax
mov eax, dword [esi + eax*8 + 4]
call fcn.004efee4
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x28]
mov eax, ebx
add eax, eax
movzx eax, word [esi + eax*8 + 0xa]
call fcn.0040919c
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0xc]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x2c]
call fcn.00409288
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle_1
inc ebx
dec edi
jne 0x4f0030
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f01b1
lea eax, [ebp - 0x2c]
mov edx, 6
call fcn.00404a08
lea eax, [ebp - 0x10]
call fcn.004049e4
lea eax, [ebp - 4]
call fcn.004049e4
ret
Function at 0x4f0734
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e94
xor eax, eax
push ebp
push 0x4f0802
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, edi
call fcn.004049e4
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.00404ca4
mov esi, eax
sar esi, 1
jns 0x4f0776
adc esi, 0
test esi, esi
jle 0x4f07df
mov dword [ebp - 8], 1
lea eax, [ebp - 0x14]
push eax
mov edx, dword [ebp - 8]
add edx, edx
dec edx
mov ecx, 2
mov eax, dword [ebp - 4]
call fcn.00404f04
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
mov edx, 0x4f0818
call fcn.00404cf0
mov eax, dword [ebp - 0x10]
call fcn.00409308
mov edx, eax
mov al, byte [ebx + 0x4fbe1c]
xor dl, al
lea eax, [ebp - 0xc]
call fcn.00404bcc
mov edx, dword [ebp - 0xc]
mov eax, edi
call fcn.00404cac
lea eax, [ebx + 1]
mov ecx, 0xa
cdq
idiv ecx
mov ebx, edx
inc dword [ebp - 8]
dec esi
jne 0x4f0781
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f0809
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00404a08
lea eax, [ebp - 4]
call fcn.004049e4
ret

Function at 0x4f081c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push eax
push 0
push 1
call sub.kernel32.dll_OpenProcess
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4f0872
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 4], 0
je 0x4f085b
push 0xffffffffffffffff
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_TerminateProcess
test eax, eax
je 0x4f085b
push 0xffffffffffffffff
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_WaitForSingleObject
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f0879
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle_1
ret

Function at 0x4f0920
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push ebx
push esi
mov esi, eax
xor eax, eax
push ebp
push 0x4f099f
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, 0x41
lea eax, [ebp - 8]
mov edx, ebx
call fcn.00404bcc
mov edx, dword [ebp - 8]
lea eax, [ebp - 4]
mov ecx, 0x4f09b4
call fcn.00404cf0
mov eax, dword [ebp - 4]
call fcn.00404ea4
push eax
call sub.kernel32.dll_GetDriveTypeA
test eax, eax
je 0x4f097e
cmp eax, 1
je 0x4f097e
cmp eax, 3
jne 0x4f097e
mov eax, dword [esi]
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc ebx
cmp ebx, 0x5b
jne 0x4f093e
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f09a6
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404a08
ret
Function at 0x4f17b8
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffea0
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x160], edx
mov dword [ebp - 0x15c], edx
mov dword [ebp - 0x158], edx
mov dword [ebp - 0x154], edx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e94
xor eax, eax
push ebp
push 0x4f19c0
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4f1984
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x500548]
mov edx, dword [eax]
call dword [edx + 0xd8]
mov eax, dword [ebp - 4]
call fcn.00402970
call fcn.00402934
lea eax, [ebp - 0x14c]
push eax
push 0x4f19d4
call sub.kernel32.dll_FindFirstFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4f18b1
lea eax, [ebp - 0xc]
lea edx, [ebp - 0x120]
mov ecx, 0x104
call fcn.00404c54
lea eax, [ebp - 0x150]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.00404cf0
mov eax, dword [ebp - 0x150]
call fcn.004096d4
test al, al
je 0x4f189a
lea eax, [ebp - 0x154]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.00404cf0
mov edx, dword [ebp - 0x154]
mov eax, dword [0x500548]
mov eax, dword [eax + 0x218]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x14c]
push eax
push ebx
call sub.kernel32.dll_FindNextFileA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4f1840
push ebx
call sub.kernel32.dll_FindClose_1
mov eax, dword [0x500548]
mov edx, dword [eax]
call dword [edx + 0xc8]
mov esi, eax
dec esi
test esi, esi
jl 0x4f1976
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x158]
mov eax, dword [0x500548]
mov eax, dword [eax + 0x218]
mov edx, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x158]
call fcn.004f0274
cmp edx, 0
jne 0x4f1903
cmp eax, 0x25435650
jbe 0x4f196e
jmp 0x4f1905
jle 0x4f196e
lea ecx, [ebp - 0x15c]
mov eax, dword [0x500548]
mov eax, dword [eax + 0x218]
mov edx, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x15c]
call fcn.004f0274
cmp edx, 0
jne 0x4f1936
cmp eax, 0x25437d60
jae 0x4f196e
jmp 0x4f1938
jge 0x4f196e
mov byte [ebp - 5], 1
lea ecx, [ebp - 0x160]
mov eax, dword [0x500548]
mov eax, dword [eax + 0x218]
mov edx, ebx
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x160]
mov eax, 0x500510
call fcn.00404a38
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4f1992
inc ebx
dec esi
jne 0x4f18d2
mov byte [ebp - 5], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4f1992
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f19c7
lea eax, [ebp - 0x160]
mov edx, 5
call fcn.00404a08
lea eax, [ebp - 0xc]
call fcn.004049e4
lea eax, [ebp - 4]
call fcn.004049e4
ret
Function at 0x4f1a58
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e94
xor eax, eax
push ebp
push 0x4f1ad6
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.004049e4
mov eax, dword [ebp - 4]
call fcn.00404ca4
mov ebx, eax
test ebx, ebx
jle 0x4f1abb
mov edi, 1
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
mov dl, byte [edx + edi - 1]
xor dl, 5
call fcn.00404bcc
mov edx, dword [ebp - 8]
mov eax, esi
call fcn.00404cac
inc edi
dec ebx
jne 0x4f1a9b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f1add
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404a08
ret

Function at 0x4f1ae4
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeb8
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x140], edx
mov dword [ebp - 0x148], edx
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x130], edx
mov dword [ebp - 0x13c], edx
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x138], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e94
lea edi, [ebp - 0x12c]
xor eax, eax
push ebp
push 0x4f1c5e
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
xor edx, edx
mov eax, 2
call fcn.004b7334
mov ebx, eax
mov dword [edi], 0x128
mov edx, edi
mov eax, ebx
call fcn.004b7354
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x4f1c2a
lea eax, [ebp - 0x138]
lea edx, [edi + 0x24]
mov ecx, 0x104
call fcn.00404c54
mov eax, dword [ebp - 0x138]
lea edx, [ebp - 0x134]
call fcn.00409a2c
mov eax, dword [ebp - 0x134]
lea edx, [ebp - 0x130]
call fcn.00408ce4
mov eax, dword [ebp - 0x130]
push eax
lea edx, [ebp - 0x13c]
mov eax, dword [ebp - 4]
call fcn.00408ce4
mov edx, dword [ebp - 0x13c]
pop eax
call fcn.00404df0
je 0x4f1c04
lea eax, [ebp - 0x144]
lea edx, [edi + 0x24]
mov ecx, 0x104
call fcn.00404c54
mov eax, dword [ebp - 0x144]
lea edx, [ebp - 0x140]
call fcn.00408ce4
mov eax, dword [ebp - 0x140]
push eax
lea edx, [ebp - 0x148]
mov eax, dword [ebp - 4]
call fcn.00408ce4
mov edx, dword [ebp - 0x148]
pop eax
call fcn.00404df0
jne 0x4f1c1b
push 0
mov eax, dword [edi + 8]
push eax
push 0
push 1
call sub.kernel32.dll_OpenProcess
push eax
call sub.kernel32.dll_TerminateProcess
mov esi, eax
mov edx, edi
mov eax, ebx
call fcn.004b7374
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4f1b65
push ebx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f1c65
lea eax, [ebp - 0x148]
mov edx, 7
call fcn.00404a08
lea eax, [ebp - 4]
call fcn.004049e4
ret
Function at 0x4f1d28
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e94
xor eax, eax
push ebp
push 0x4f1d85
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
mov eax, dword [ebp - 4]
call fcn.00404ea4
push eax
call sub.kernel32.dll_SetFileAttributesA
mov eax, dword [ebp - 4]
call fcn.004f1ae4
push 0x12c
call sub.kernel32.dll_Sleep_1
mov eax, dword [ebp - 4]
call fcn.0040990c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f1d8c
lea eax, [ebp - 4]
call fcn.004049e4
ret
Function at 0x401658
Capabilities:
Copy file
Delete file
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
push ebx
xor ebx, ebx
cmp byte [ebp + 0xc], bl
push esi
push edi
mov esi, ecx
je 0x4016fc
lea edi, [ebp - 0xc4]
mov dword [ebp + 0xc], 1
sub edi, 4
push dword [ebp + 8]
lea eax, [ebp - 0xc4]
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
add esp, 0xc
mov byte [eax + edi], bl
mov eax, dword [ebp + 0xc]
inc dword [ebp + 0xc]
push eax
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0xc4]
push str._s_tmp.d_d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0xc4]
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
setne al
cmp dword [ebp + 0xc], 0x63
jg 0x4016e1
cmp al, bl
je 0x401681
lea eax, [ebp - 0xc4]
lea edi, [esi + 0x1c8]
push eax
push edi
mov dword [ebp + 0xc], edi
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push edi
jmp 0x401719
lea edi, [esi + 0x1c8]
push edi
mov dword [ebp + 0xc], edi
call sub.MSVCRT.dll_strlen
push eax
push ebx
push edi
call sub.MSVCRT.dll_memset
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [esi + 0x1c4], eax
je 0x401838
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Description
push eax
call edi
push str.Startup
mov dword [esi + 0x28c], eax
push dword [esi + 0x1c4]
call edi
push str.Shutdown
mov dword [esi + 0x294], eax
push dword [esi + 0x1c4]
call edi
push str.SetParams
mov dword [esi + 0x290], eax
push dword [esi + 0x1c4]
call edi
push str.GetParams
mov dword [esi + 0x298], eax
push dword [esi + 0x1c4]
call edi
push str.TransformBuffer
mov dword [esi + 0x29c], eax
push dword [esi + 0x1c4]
call edi
push str.RestoreBuffer
mov dword [esi + 0x2a0], eax
push dword [esi + 0x1c4]
call edi
push str.FreeBuffer
mov dword [esi + 0x2a4], eax
push dword [esi + 0x1c4]
call edi
push str.Reset
mov dword [esi + 0x2a8], eax
push dword [esi + 0x1c4]
call edi
cmp dword [esi + 0x294], ebx
mov dword [esi + 0x2ac], eax
je 0x40181e
cmp dword [esi + 0x290], ebx
je 0x40181e
cmp dword [esi + 0x298], ebx
je 0x40181e
cmp dword [esi + 0x29c], ebx
je 0x40181e
cmp dword [esi + 0x2a0], ebx
je 0x40181e
cmp dword [esi + 0x2a4], ebx
je 0x40181e
cmp dword [esi + 0x2a8], ebx
je 0x40181e
push 1
mov ecx, esi
call fcn.004015a4
mov al, 1
jmp 0x40183a
push dword [esi + 0x1c4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
je 0x401838
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x401f98
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x98], 5
jne 0x402044
xor ebx, ebx
cmp dword [esi + 0x9c], ebx
je 0x402044
cmp word [esi + 0x128], 1
jne 0x402044
lea eax, [ebp + 8]
push eax
push 1
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40203b
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x400
push eax
lea eax, [ebp - 0x404]
push eax
push ebx
push ebx
push str.SubVersionNumber
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40203b
lea eax, [ebp - 0x404]
push 0x431240
push eax
call dword [sym.imp.MSVCRT.dll__mbsicmp]
pop ecx
test eax, eax
pop ecx
jne 0x40203b
cmp dword [ebp + 0xc], ebx
mov word [esi + 0x12a], 1
je 0x40203b
mov word [esi + 0x96], 1
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
leave
ret 8

Function at 0x40204a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
lea eax, [ebp - 4]
push esi
push eax
xor esi, esi
push 1
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402123
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x400
push eax
lea eax, [ebp - 0x408]
push eax
push esi
push esi
push str.CurrentType
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402123
mov esi, dword [sym.imp.MSVCRT.dll__mbsicmp]
lea eax, [ebp - 0x408]
push str.Uniprocessor_Free
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x4020c5
mov eax, dword [ebp + 8]
or byte [eax + 0x12d], 4
jmp 0x402123
lea eax, [ebp - 0x408]
push str.Uniprocessor_Checked
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x4020e5
mov eax, dword [ebp + 8]
or byte [eax + 0x12d], 8
jmp 0x402123
lea eax, [ebp - 0x408]
push str.Multiprocessor_Free
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x402105
mov eax, dword [ebp + 8]
or byte [eax + 0x12d], 0x10
jmp 0x402123
lea eax, [ebp - 0x408]
push str.Multiprocessor_Checked
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x402123
mov eax, dword [ebp + 8]
or byte [eax + 0x12d], 0x20
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret 4
Function at 0x402131
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
lea eax, [ebp - 4]
push edi
push eax
xor edi, edi
push 0x20019
push edi
push str.SystemCurrentControlSetControlProductOptions
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402260
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebp - 0x408]
push eax
push edi
push edi
push str.ProductType
push dword [ebp - 4]
mov dword [ebp - 8], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402256
cmp dword [ebp + 0xc], edi
mov esi, dword [sym.imp.MSVCRT.dll__mbsicmp]
lea eax, [ebp - 0x408]
push str.LANMANNT
push eax
je 0x4021dc
call esi
pop ecx
test eax, eax
pop ecx
jne 0x4021b8
mov eax, dword [ebp + 8]
or dword [eax + 0x12c], 4
jmp 0x402256
lea eax, [ebp - 0x408]
push str.LANSECNT
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x402256
mov eax, dword [ebp + 8]
or dword [eax + 0x12c], 8
jmp 0x402256
call esi
pop ecx
test eax, eax
pop ecx
jne 0x4021f3
mov eax, dword [ebp + 8]
mov dword [eax + 0x130], 2
jmp 0x4021ac
lea eax, [ebp - 0x408]
push str.SERVERNT
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x402216
mov eax, dword [ebp + 8]
mov dword [eax + 0x130], 1
jmp 0x402256
lea eax, [ebp - 0x408]
push str.LANSECNT
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x402239
mov eax, dword [ebp + 8]
mov dword [eax + 0x130], 2
jmp 0x4021d3
lea eax, [ebp - 0x408]
push str.WinNT
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x402256
mov eax, dword [ebp + 8]
mov dword [eax + 0x130], edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop edi
leave
ret 8

Function at 0x4024df
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
push esi
lea eax, [ebp - 4]
push edi
xor esi, esi
push eax
push 0x20019
push esi
push str.SoftwareMicrosoftWindows_NTCurrentVersion
mov edi, ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402568
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0x80
push eax
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 8]
push eax
push esi
push str.CSDVersion
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40255f
cmp dword [ebp - 8], 1
jne 0x40254d
lea eax, [ebp - 0x8c]
mov ecx, edi
push eax
call fcn.0040249d
mov esi, eax
jmp 0x40255f
cmp dword [ebp - 8], 4
jne 0x40255f
xor eax, eax
mov al, byte [ebp - 0x8b]
movzx si, al
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ax, si
pop edi
pop esi
leave
ret
Function at 0x40256f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.SystemCurrentControlSetControlTerminal_Server
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4025de
lea eax, [ebp - 0xc]
mov dword [ebp - 8], 1
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push str.TSAppCompat
mov dword [ebp - 0xc], 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4025d5
cmp dword [ebp - 8], eax
jne 0x4025d5
mov eax, dword [ebp + 8]
or byte [eax + 0x12d], 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret 4

Function at 0x4025e2
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 4]
push esi
xor esi, esi
push eax
push 0x20019
push esi
push str.SystemWPAMediaCenter
push 0x80000002
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40264d
lea eax, [ebp - 0xc]
mov dword [ebp - 8], esi
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push str.Installed
mov dword [ebp - 0xc], 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402644
cmp dword [ebp - 8], esi
je 0x402644
mov eax, dword [ebp + 8]
or byte [eax + 0x12d], 0x40
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret 4
Function at 0x402652
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
lea eax, [ebp - 4]
push edi
xor ebx, ebx
push eax
push 0x20019
push ebx
push str.SystemCurrentControlSetControlProductOptions
push 0x80000002
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402785
lea eax, [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0xc]
push ebx
push eax
mov edi, str.ProductSuite
push ebx
push edi
mov dword [ebp - 0xc], ebx
push dword [ebp - 4]
mov dword [ebp - 8], ebx
call esi
test eax, eax
jne 0x40277c
cmp dword [ebp - 8], ebx
je 0x40277c
push dword [ebp - 8]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
pop ecx
lea eax, [ebp - 8]
mov dword [ebp - 0x10], ebx
push eax
lea eax, [ebp - 0xc]
push ebx
push eax
push 0
push edi
push dword [ebp - 4]
call esi
test eax, eax
jne 0x402775
cmp dword [ebp - 0xc], 7
jne 0x402775
cmp byte [ebx], al
mov esi, ebx
je 0x402775
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push str.Terminal_Server
push esi
call edi
pop ecx
test eax, eax
pop ecx
jne 0x40270f
or dword [ebx + 0x12c], 0x10
jmp 0x402760
push 0x43141c
push esi
call edi
pop ecx
test eax, eax
pop ecx
je 0x402759
push str.Small_Business
push esi
call edi
pop ecx
test eax, eax
pop ecx
je 0x402759
push str.Enterprise
push esi
call edi
pop ecx
test eax, eax
pop ecx
jne 0x402742
or dword [ebx + 0x12c], 2
jmp 0x402760
push str.Personal
push esi
call edi
pop ecx
test eax, eax
pop ecx
jne 0x402760
or dword [ebx + 0x12c], 0x40
jmp 0x402760
or dword [ebx + 0x12c], 1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
jne 0x4026f8
mov ebx, dword [ebp - 0x10]
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x402d30
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov byte [ebp - 1], bl
cmp dword [esi + 4], ebx
jne 0x402d54
push dword [0x42950c]
push ebx
push 6
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x402d7b
push ebx
push ebx
push ebx
push 6
push eax
mov byte [ebp - 1], 1
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esi + 0xc], eax
jne 0x402d75
mov byte [ebp - 1], bl
mov dword [esi + 0x109b4], eax
mov al, byte [ebp - 1]
pop esi
pop ebx
leave
ret