joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405c12
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x43fd50], 0x44
push eax
xor eax, eax
push 0x43fd50
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405c4d
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x406074
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x43d550
push esi
call fcn.004064a8
push esi
call fcn.00406025
mov edi, eax
test edi, edi
jne 0x406095
xor eax, eax
jmp 0x4060e7
push edi
call fcn.00406730
test byte [0x449378], 0x80
je 0x4060ae
mov al, byte [edi]
test al, al
je 0x406091
cmp al, 0x5c
je 0x406091
sub edi, esi
push esi
call fcn.004064be
cmp eax, edi
push esi
jle 0x4060d1
call fcn.00406976
test eax, eax
je 0x4060c9
test byte [eax], 0x10
je 0x406091
push esi
call fcn.00405fd8
jmp 0x4060b0
call fcn.00405f91
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x40615e
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40617a
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x40617d
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x4061ac
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x63
pop edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4061f1
mov eax, edi
dec edi
test eax, eax
jne 0x4061b7
and byte [esi], al
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4061eb
Function at 0x4061f5
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.0040699d
test eax, eax
mov esi, dword [esp + 0x18]
je 0x406219
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x406352
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x43fed8], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x43fed8
je 0x40625d
push 1
push 0
push esi
call fcn.0040617d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x406358
cmp eax, edi
jg 0x406358
mov esi, 0x43f950
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x406358
cmp eax, edi
jg 0x406358
push esi
push ebp
push str._s_s_r_n
push 0x43f550
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x449370]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.004064dc
push 4
push 0xc0000000
push esi
call fcn.0040617d
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x406352
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x40634b
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40634b
cmp edi, dword [esp + 0x18]
jne 0x40634b
push str._Rename__r_n
push esi
call fcn.004060ec
test eax, eax
jne 0x40635f
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.004064a8
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x43f550
push eax
call fcn.00406138
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x4493f0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x40ab58
push eax
call fcn.004060ec
test eax, eax
je 0x406316
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x406386
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x40637b
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x406318
Function at 0x40638e
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4063ff
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x2000
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4063ee
cmp dword [ebp + 0x14], 1
je 0x4063f0
cmp dword [ebp + 0x14], 2
je 0x4063f0
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x1fff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x4067c9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x4067ee
mov eax, dword [0x40a928]
cmp eax, 0xffffffff
je 0x4067e5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40a928], 0xffffffff
jmp 0x406861
cmp dword [0x440ae0], ebx
je 0x406861
cmp byte [0x4406e0], bl
je 0x40682d
cmp dword [0x40a928], 0xffffffff
jne 0x406836
push 4
push 0x40000000
push 0x4406e0
call fcn.0040617d
cmp eax, 0xffffffff
mov dword [0x40a928], eax
je 0x406861
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40a928], 0xffffffff
je 0x406861
push esi
mov esi, 0x444b00
push 0x40ab70
push esi
call fcn.004064cb
lea eax, [ebp + 8]
push ebx
push eax
push esi
call fcn.004064be
push eax
push esi
push dword [0x40a928]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
pop ebp
ret 4

Function at 0x406a13
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
xor esi, esi
cmp dword [0x4402dc], esi
push edi
jne 0x406a4d
mov ecx, 0x4402d8
push 8
mov eax, esi
pop edi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec edi
jne 0x406a29
mov dword [ecx], eax
add ecx, 4
inc esi
cmp ecx, 0x4406d8
jl 0x406a24
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov edx, ecx
dec ecx
test edx, edx
not eax
jbe 0x406a82
lea edx, [ecx + 1]
mov ecx, dword [esp + 0x10]
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x4402d8]
xor eax, esi
inc ecx
dec edx
jne 0x406a65
pop edi
pop esi
not eax
ret 0xc
Function at 0x401000
Capabilities:
Hide graphical window

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0
push eax
push 0
push 0
push 0
push 0x80000000
push 0
push 0x80000000
push 0x82040000
push 0x408360
push 0x4082f8
push 0x80
mov dword [0x4083c4], eax
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
test esi, esi
jne 0x401041
pop esi
ret
push 0
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
pop esi
ret

Function at 0x401940
Capabilities:
Terminate thread

Disassembly:
push ecx
mov eax, dword [0x4082e4]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
push eax
call ebx
mov edx, dword [0x4082f0]
lea ecx, [esp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 8], 0x103
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x4019bc
push edi
push str.TTrayTerminateTh
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edi, eax
push edi
call ebx
mov eax, dword [0x4082f0]
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov dword [esp + 0x10], eax
call esi
cmp dword [esp + 0xc], 0x102
pop edi
jne 0x4019bc
mov ecx, dword [0x4082f0]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [0x4082f4]
push edx
call esi
mov eax, dword [0x4082e8]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [0x4082dc]
push ecx
call esi
mov edx, dword [0x4082e0]
push edx
call esi
mov eax, dword [0x4082e8]
push eax
call esi
mov ecx, dword [0x4082e4]
push ecx
call esi
mov eax, dword [esp + 0x14]
test eax, eax
pop esi
pop ebx
jne 0x401a08
push 2
call fcn.00401730
add esp, 4
mov edx, dword [esp + 8]
push 0x8b
push edx
call fcn.00401290
mov eax, dword [0x4082ec]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
pop ecx
ret
Function at 0x4010a8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call sub.MSVCRT.dll_strlen
mov esi, eax
push edi
push esi
push edi
call fcn.0040105d
mov eax, esi
add esp, 0x10
cdq
sub eax, edx
xor ebx, ebx
mov esi, eax
mov eax, dword [ebp + 0xc]
sar esi, 1
test esi, esi
mov dword [ebp + 8], eax
jle 0x4010f2
lea eax, [ebp + 8]
push eax
call fcn.00401000
add al, 8
pop ecx
xor al, byte [ebx + edi]
xor al, 0x19
mov byte [ebx + edi], al
inc ebx
cmp ebx, esi
jl 0x4010d9
and byte [esi + edi], 0
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x40175f
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
lea ebx, [edi + 1]
push ebx
call esi
pop ecx
mov dword [ebp - 4], eax
test eax, eax
pop ecx
je 0x4017f3
mov ecx, dword [ebp + 0xc]
test edi, edi
mov dword [ebp - 8], ecx
jle 0x4017c5
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], eax
sub ecx, eax
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], ecx
lea eax, [ebp - 8]
push eax
call fcn.00401000
mov edx, dword [ebp - 0xc]
pop ecx
mov ecx, eax
mov eax, dword [ebp + 0xc]
add cl, 8
xor cl, byte [edx + eax]
xor cl, 0x19
mov byte [eax], cl
inc eax
dec dword [ebp + 8]
mov dword [ebp + 0xc], eax
jne 0x40179f
add ebx, ebx
push ebx
call esi
mov esi, eax
pop ecx
test esi, esi
je 0x4017e7
push ebx
push 0
push esi
call sub.MSVCRT.dll_memset
push esi
push edi
push dword [ebp - 4]
call fcn.0040101c
add esp, 0x18
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4018a3
Capabilities:
Read .ini file

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x14]
mov esi, ecx
cmp edi, dword [esi + 0xc]
jle 0x4018ce
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4018be
push eax
call sub.MFC42.DLL_operatordelete
pop ecx
lea eax, [edi + 1]
push eax
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0xc], edi
lea eax, [edi + 1]
push ebx
push eax
push 0
push dword [esi + 0x10]
call sub.MSVCRT.dll_memset
mov ebx, dword [esp + 0x1c]
add esp, 0xc
cmp dword [esi + 0x14], 0
je 0x4018fb
test ebx, ebx
je 0x4018fb
push dword [esi + 0x1c]
push ebx
call fcn.0040175f
pop ecx
mov ebx, eax
pop ecx
push dword [esi + 4]
push edi
push dword [esi + 0x10]
push dword [esp + 0x20]
push ebx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [esi + 0x14], 0
je 0x401922
test ebx, ebx
je 0x401922
push ebx
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
cmp dword [esi + 0x18], 0
pop ebx
je 0x401936
push dword [esi + 0x1c]
push dword [esi + 0x10]
call fcn.004010a8
pop ecx
pop ecx
pop edi
pop esi
ret 0xc
Function at 0x401d74
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x416cdf
call fcn.0040c000
sub esp, 0x114
push ebx
push esi
xor ebx, ebx
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call sub.MFC42.DLL_CString::CString_3
push 1
xor eax, eax
pop esi
lea edi, [ebp - 0x11f]
push 0x40
mov byte [ebp - 0x120], bl
pop ecx
mov dword [ebp - 4], esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], 0x104
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::Empty
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x401de4
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x14], esi
jmp 0x401e28
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x120]
push eax
push ebx
push ebx
push dword [ebp + 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401e10
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::operator_1
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x14], esi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10

Function at 0x401e47
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x401e77
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x401e77
xor eax, eax
jmp 0x401ea0
push dword [ebp + 0x14]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push dword [ebp + 0x14]
push 1
push 0
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
pop eax
leave
ret 0x10

Function at 0x401ea4
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401ed9
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x401ed9
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
pop eax
jmp 0x401edb
xor eax, eax
pop ebp
ret 0xc
Function at 0x402246
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
and byte [ebp - 0x128], 0
push ebx
push esi
push edi
mov edx, ecx
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x127]
mov ebx, dword [ebp + 8]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
mov ecx, edx
stosb byte es:[edi], al
call fcn.00402327
test eax, eax
jne 0x402320
push ebx
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x402320
mov esi, dword [sym.imp.MSVCRT.dll__mbschr]
push 0x5c
push ebx
call esi
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x4022fb
sub eax, ebx
push eax
lea eax, [ebp - 0x128]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll__mbsnbcpy]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 0x14
test eax, eax
jge 0x4022ed
lea eax, [ebp - 0x128]
push eax
call sub.MSVCRT.dll_strlen
cmp eax, 2
pop ecx
jbe 0x4022ed
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.MSVCRT.dll__mkdir]
test eax, eax
pop ecx
jne 0x402320
cmp byte [edi + 1], 0
lea eax, [edi + 1]
je 0x402320
push 0x5c
push eax
jmp 0x402296
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll__stat]
pop ecx
test eax, eax
pop ecx
jge 0x402320
push ebx
call sub.MSVCRT.dll_strlen
cmp eax, 2
pop ecx
jbe 0x402320
push ebx
call dword [sym.imp.MSVCRT.dll__mkdir]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x4023c1
Capabilities:
Get common file path

Disassembly:
mov eax, 0x416d87
call fcn.0040c000
sub esp, 0xc
and dword [ebp - 0x18], 0
push ebx
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_3
push 1
lea ecx, [ebp - 0x14]
pop ebx
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_CString::CString_3
push 0
push 0x1a
push 0x104
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0x41a5b4
lea eax, [ebp - 0x14]
push dword [ebp - 0x10]
push str._s_sConfigconfig.ini
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [ebp + 8]
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x4035f8
Capabilities:
Get hostname

Disassembly:
mov eax, 0x4170a3
call fcn.0040c000
sub esp, 0xc
and dword [ebp - 0x18], 0
push esi
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], 0x10
call sub.MFC42.DLL_CString::CString_3
push 1
lea ecx, [ebp - 0x10]
pop esi
push dword [ebp - 0x14]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CString::GetBuffer
push dword [ebp - 0x14]
mov edi, eax
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
push 0xf
lea ecx, [ebp - 0x10]
jne 0x403666
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [ebp + 8]
push 0x422a40
call sub.MFC42.DLL_CString::CString_4
mov dword [ebp - 0x18], esi
jmp 0x40367a
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x18], esi
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4

Function at 0x403699
Capabilities:
Get session user name

Disassembly:
mov eax, 0x4170cf
call fcn.0040c000
sub esp, 0xc
push esi
lea ecx, [ebp - 0x10]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetUserNameA]
xor eax, eax
push ecx
push eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
call edi
test eax, eax
je 0x4036d0
mov ecx, dword [ebp + 8]
push 0x422a40
call sub.MFC42.DLL_CString::CString_4
jmp 0x40374f
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x10], eax
jae 0x4036db
mov dword [ebp - 0x10], eax
push ebx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [ebp - 0x10]
push 1
pop esi
inc eax
push eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CString::GetBuffer
mov ebx, eax
mov eax, dword [ebp - 0x10]
inc eax
push eax
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push ebx
call edi
pop ebx
lea ecx, [ebp - 0x14]
push dword [ebp + 0xc]
test eax, eax
jne 0x40372f
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [ebp + 8]
push 0x422a40
call sub.MFC42.DLL_CString::CString_4
jmp 0x403740
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call sub.MFC42.DLL_CString::CString_1
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x18], esi
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 8
Function at 0x403942
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x41714f
call fcn.0040c000
sub esp, 0x114
push ebx
push esi
xor ebx, ebx
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call sub.MFC42.DLL_CString::CString_3
push 1
xor eax, eax
pop esi
lea edi, [ebp - 0x11f]
push 0x40
mov byte [ebp - 0x120], bl
pop ecx
mov dword [ebp - 4], esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], 0x104
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::Empty
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4039b2
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x14], esi
jmp 0x4039f6
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x120]
push eax
push ebx
push ebx
push dword [ebp + 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4039de
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::operator_1
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x14], esi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10

Function at 0x403e34
Capabilities:
Delete file
Get file size

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov ecx, 0x422b18
call sub.MFC42.DLL_CString::operator_1
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [0x422b18]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x403e8e
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0x80000
jb 0x403e8e
push dword [0x422b18]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
ret

Function at 0x40428b
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x4172f4
call fcn.0040c000
push ecx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call sub.MFC42.DLL_CString::CString_3
xor edi, edi
lea ecx, [esi + 4]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0xc], edi
mov dword [esi + 8], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x34], 1
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret

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

Disassembly:
mov eax, dword [esp + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404499
test al, 0x10
je 0x404499
push 1
pop eax
jmp 0x40449b
xor eax, eax
ret 4
Function at 0x404f9a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [esi + 0x78], edi
jne 0x404fcd
cmp dword [esi + 0x6c], edi
je 0x404fd2
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp eax, edi
je 0x404fca
push dword [esi + 0x70]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, edi
mov dword [esi + 0x78], eax
jne 0x404fcd
mov dword [esi + 0x6c], edi
cmp dword [esi + 0x6c], edi
jne 0x404ffe
lea eax, [ebp - 4]
push edi
push eax
mov dword [ebp - 4], edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0xa0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405016
mov eax, dword [ebp - 4]
cmp eax, edi
je 0x405016
cmp dword [ebp + 0xc], eax
je 0x405030
jmp 0x405016
mov eax, dword [esi + 0x74]
mov edi, dword [ebp + 0xc]
add eax, edi
cmp eax, dword [esi + 0x70]
jbe 0x40501a
mov ecx, esi
call fcn.00405039
test eax, eax
jne 0x40501a
xor eax, eax
jmp 0x405033
mov eax, dword [esi + 0x74]
push edi
push dword [ebp + 8]
add eax, dword [esi + 0x78]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [esi + 0x74], edi
push 1
pop eax
pop edi
pop esi
leave
ret 8