joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44fccc
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda0
push ebx
xor edx, edx
mov dword [ebp - 0x260], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x44fe77
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x34], 0
jne 0x44fe58
mov dl, 1
mov eax, dword [0x412784]
call fcn.0040348c
mov edx, dword [ebp - 4]
mov dword [edx + 0x34], eax
mov eax, dword [ebp - 4]
add eax, 0x38
call fcn.004042d4
lea eax, [ebp - 0x114]
push eax
push 0x40
call sub.user32.dll_GetKeyboardLayoutList
dec eax
test eax, eax
jl 0x44fe47
inc eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.0043dc0c
test al, al
je 0x44fe3a
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x258], 0
lea ecx, [ebp - 0x25c]
mov edx, 0x44fe88
lea eax, [ebp - 0x254]
call fcn.00409324
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x44fe3a
xor eax, eax
push ebp
push 0x44fe33
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], pe_nt_image_headers32
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0
push 0x44fec0
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x44fe1c
lea eax, [ebp - 0x260]
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00404544
mov edx, dword [ebp - 0x260]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x3c]
jne 0x44fe1c
mov eax, dword [ebp - 4]
add eax, 0x38
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00404544
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x44fe3a
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
add dword [ebp - 0x14], 4
dec dword [ebp - 0x10]
jne 0x44fd3d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov byte [eax + 0x1d], 0
mov dl, 1
call fcn.004164a8
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x44fe7e
lea eax, [ebp - 0x260]
call fcn.004042d4
ret

Function at 0x4507c0
Capabilities:
Create thread
Set global application hook

Disassembly:
push ecx
mov eax, dword [0x491bb4]
cmp byte [eax + 0xa5], 0
jne 0x450831
cmp dword [0x491bcc], 0
jne 0x4507f2
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
mov eax, 0x45077c
push eax
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x491bcc], eax
cmp dword [0x491bc8], 0
jne 0x45080d
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x491bc8], eax
cmp dword [0x491bd0], 0
jne 0x450831
push esp
push 0
push 0
push 0x450720
push 0x3e8
push 0
call sub.kernel32.dll_CreateThread_1
mov dword [0x491bd0], eax
pop edx
ret
Function at 0x450ec4
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x491bb4]
cmp dword [eax + 0x30], 0
je 0x450f6e
cmp dword [ebx + 0x94], 0
jne 0x450f68
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x450e54
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x450f68
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x450f2e
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x450f68
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.0041472c
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x450f3d
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x451acc
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xa4], 0
je 0x451b01
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x30]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.004043c4
jmp 0x451b0e
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.00404328
add esp, 0x100
pop esi
pop ebx
ret

Function at 0x452c38
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x452c79
mov eax, esi
call fcn.00439238
test al, al
je 0x452c79
mov eax, dword [ebx + 0x84]
call fcn.00438f34
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x452c79
push 0
mov eax, dword [ebx + 0x84]
call fcn.00438f34
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret

Function at 0x4540c8
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
lea ecx, [ebp - 4]
mov edx, esi
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0x34]
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 4]
push eax
push esi
mov eax, dword [ebx + 0x40]
push eax
call sub.wsock32.dll_send
mov edx, eax
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp eax, 0xffffffff
je 0x454105
add dword [ebx + 0x38], eax
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 4
Function at 0x454374
Capabilities:
Resolve dns

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffe0
mov esi, ecx
mov ebx, edx
mov eax, esi
call fcn.004042d4
test ebx, ebx
je 0x454415
mov al, byte [ebx]
add al, 0xd0
sub al, 0xa
jae 0x4543b0
mov eax, ebx
call fcn.00404794
push eax
call sub.wsock32.dll_inet_addr
inc eax
je 0x454421
mov eax, esi
mov edx, ebx
call fcn.00404328
jmp 0x454421
mov eax, ebx
call fcn.00404794
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x454421
mov ebx, eax
push esi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax]
xor eax, eax
mov al, byte [edi]
mov dword [esp + 4], eax
mov byte [esp + 8], 0
xor eax, eax
mov al, byte [edi + 1]
mov dword [esp + 0xc], eax
mov byte [esp + 0x10], 0
xor eax, eax
mov al, byte [edi + 2]
mov dword [esp + 0x14], eax
mov byte [esp + 0x18], 0
xor eax, eax
mov al, byte [edi + 3]
mov dword [esp + 0x1c], eax
mov byte [esp + 0x20], 0
lea edx, [esp + 4]
mov ecx, 3
mov eax, 0x454430
call fcn.004093bc
jmp 0x454421
mov eax, esi
mov edx, 0x454444
call fcn.00404328
add esp, 0x20
pop edi
pop esi
pop ebx
ret

Function at 0x454994
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004558c8
mov eax, dword [ebp - 4]
mov dword [eax], 0x67452301
mov eax, dword [ebp - 4]
mov dword [eax + 4], 0xefcdab89
mov eax, dword [ebp - 4]
mov dword [eax + 8], 0x98badcfe
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], 0x10325476
pop ecx
pop ebp
ret
Function at 0x45578c
Capabilities:
Authenticate hmac

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff14
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0x40
jle 0x4557d4
lea eax, [ebp - 0x6c]
call fcn.00454994
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x6c]
mov ecx, dword [ebp + 0xc]
call fcn.004549d0
lea edx, [ebp - 0x6c]
mov eax, dword [ebp + 8]
call fcn.00454af8
mov dword [ebp + 0xc], 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
jmp 0x4557da
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
inc eax
cmp eax, dword [ebp + 0xc]
jg 0x45580f
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
xor al, 0x36
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx - 0xac], al
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
xor al, 0x5c
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx - 0xec], al
inc dword [ebp - 0x14]
jmp 0x455825
mov eax, dword [ebp - 0x10]
mov byte [ebp + eax - 0xac], 0x36
mov eax, dword [ebp - 0x10]
mov byte [ebp + eax - 0xec], 0x5c
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x40
jne 0x4557df
lea eax, [ebp - 0x6c]
call fcn.00454994
lea edx, [ebp - 0xac]
lea eax, [ebp - 0x6c]
mov ecx, 0x40
call fcn.004549d0
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x6c]
mov ecx, dword [ebp - 8]
call fcn.00455614
lea edx, [ebp - 0x6c]
mov eax, dword [ebp + 8]
call fcn.00454af8
lea eax, [ebp - 0x6c]
call fcn.00454994
lea edx, [ebp - 0xec]
lea eax, [ebp - 0x6c]
mov ecx, 0x40
call fcn.004549d0
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x6c]
mov ecx, 0x10
call fcn.004549d0
lea edx, [ebp - 0x6c]
mov eax, dword [ebp + 8]
call fcn.00454af8
mov esp, ebp
pop ebp
ret 8
Function at 0x46b1dc
Capabilities:
Encode data using xor
Encrypt data using des
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x4905f3]
mov edx, dword [ebp - 4]
mov al, byte [edx + eax - 1]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor al, byte [edx + ecx - 1]
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx - 0x55], al
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x31
jne 0x46b1f2
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
dec eax
add eax, eax
lea eax, [eax + eax*2]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
dec eax
shl eax, 2
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax - 0x54]
add eax, eax
mov edx, dword [ebp - 0x18]
movzx edx, byte [ebp + edx - 0x4f]
add eax, edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax - 0x53]
shl eax, 3
mov edx, dword [ebp - 0x18]
movzx edx, byte [ebp + edx - 0x52]
shl edx, 2
add eax, edx
mov edx, dword [ebp - 0x18]
movzx edx, byte [ebp + edx - 0x51]
add edx, edx
add eax, edx
mov edx, dword [ebp - 0x18]
movzx edx, byte [ebp + edx - 0x50]
add eax, edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x14]
dec eax
je 0x46b2a1
dec eax
je 0x46b2d6
dec eax
je 0x46b308
dec eax
je 0x46b339
jmp 0x46b361
mov eax, dword [ebp - 0x20]
add eax, eax
mov edx, dword [ebp - 0x10]
shl edx, 3
lea edx, [edx*8 + 0x4906bc]
lea eax, [edx + eax*8]
mov edx, dword [ebp - 0x24]
mov al, byte [eax + edx - 0x40]
and al, 8
and eax, 0xff
shr eax, 3
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x14]
mov byte [ebp + edx - 0x75], al
jmp 0x46b361
mov eax, dword [ebp - 0x20]
add eax, eax
mov edx, dword [ebp - 0x10]
shl edx, 3
lea edx, [edx*8 + 0x4906bc]
lea eax, [edx + eax*8]
mov edx, dword [ebp - 0x24]
mov al, byte [eax + edx - 0x40]
and al, 4
and eax, 0xff
shr eax, 2
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x14]
mov byte [ebp + edx - 0x75], al
jmp 0x46b361
mov eax, dword [ebp - 0x20]
add eax, eax
mov edx, dword [ebp - 0x10]
shl edx, 3
lea edx, [edx*8 + 0x4906bc]
lea eax, [edx + eax*8]
mov edx, dword [ebp - 0x24]
mov al, byte [eax + edx - 0x40]
and al, 2
and eax, 0xff
shr eax, 1
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x14]
mov byte [ebp + edx - 0x75], al
jmp 0x46b361
mov eax, dword [ebp - 0x20]
add eax, eax
mov edx, dword [ebp - 0x10]
shl edx, 3
lea edx, [edx*8 + 0x4906bc]
lea eax, [edx + eax*8]
mov edx, dword [ebp - 0x24]
mov al, byte [eax + edx - 0x40]
and al, 1
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x14]
mov byte [ebp + edx - 0x75], al
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 5
jne 0x46b289
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 9
jne 0x46b224
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x490623]
mov al, byte [ebp + eax - 0x75]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
mov byte [edx + ecx - 1], al
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x21
jne 0x46b382
mov esp, ebp
pop ebp
ret
Function at 0x46c3c8
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov al, byte [eax]
mov byte [ebp - 0x24], al
mov eax, dword [ebp - 4]
mov al, byte [eax]
shl eax, 7
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 1]
shr edx, 1
or al, dl
mov byte [ebp - 0x23], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 1]
shl eax, 6
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 2]
shr edx, 2
or al, dl
mov byte [ebp - 0x22], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 2]
shl eax, 5
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 3]
shr edx, 3
or al, dl
mov byte [ebp - 0x21], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 3]
shl eax, 4
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 4]
shr edx, 4
or al, dl
mov byte [ebp - 0x20], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 4]
shl eax, 3
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 5]
shr edx, 5
or al, dl
mov byte [ebp - 0x1f], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 5]
shl eax, 2
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 6]
shr edx, 6
or al, dl
mov byte [ebp - 0x1e], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 6]
add eax, eax
and al, 0xff
mov byte [ebp - 0x1d], al
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 1
xor eax, eax
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
movzx eax, byte [ebp + eax - 0x24]
shl eax, cl
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
xor eax, dword [ebp - 0x1c]
and eax, 1
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 8
jne 0x46c492
mov eax, dword [ebp - 0x10]
mov al, byte [ebp + eax - 0x24]
and al, 0xfe
or al, byte [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx - 0x24], al
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 8
jne 0x46c48b
mov eax, dword [ebp - 0xc]
mov edx, 8
call fcn.00404920
push 1
mov eax, dword [ebp - 0xc]
call fcn.004047ec
mov edx, eax
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 8]
call fcn.0046b490
mov esp, ebp
pop ebp
ret

Function at 0x471098
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
lea eax, [ebp - 0x28]
push eax
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
jmp 0x401013
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrlenA]
push ebx
xor edi, edi
call esi
test eax, eax
jle 0x401031
xor byte [edi + ebx], 0xa5
push ebx
inc edi
call esi
cmp edi, eax
jl 0x401025
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
ret

Function at 0x401038
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
jmp 0x40104e
and dword [ebp - 4], 0
mov esi, 0x4030d4
push 0
push esi
call section..text
pop ecx
push eax
call dword [sym.imp.USER32.dll_FindWindowA]
push esi
mov ebx, eax
call section..text
test ebx, ebx
pop ecx
je 0x40109b
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp dword [ebp - 4], 0
je 0x40109b
push dword [ebp - 4]
push 1
push 1
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
pop esi
pop ebx
leave
ret
Function at 0x401109
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004017d0
push ebx
push esi
push edi
jmp 0x401123
and byte [ebp - 0x100c], 0
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x100b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 1
lea eax, [ebp - 4]
pop edi
mov esi, 0x4030e0
push eax
push 0xf003f
push 0
push esi
mov dword [ebp - 8], 0xfff
mov dword [ebp - 0xc], edi
call section..text
pop ecx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401177
xor eax, eax
jmp 0x4012c9
push esi
call section..text
pop ecx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0xc]
push eax
mov esi, 0x403118
push 0
push esi
call section..text
pop ecx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4011ac
mov dword [ebp - 8], edi
push esi
call section..text
mov ebx, dword [ebp + 8]
pop ecx
test ebx, ebx
jne 0x401212
cmp dword [ebp - 8], edi
jbe 0x4011fe
mov ebx, 0x403050
lea eax, [ebp - 0x100c]
push ebx
push eax
call fcn.0040109f
pop ecx
test eax, eax
pop ecx
jne 0x4012c7
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x100c]
push 0x403128
push eax
call edi
lea eax, [ebp - 0x100c]
push ebx
push eax
call edi
jmp 0x401284
lea eax, [ebp - 0x100c]
push 0x403050
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
jmp 0x401287
and dword [ebp + 8], 0
cmp dword [ebx], 0
jle 0x401287
lea edi, [ebx + 4]
cmp dword [ebp + 8], 0x32
jge 0x401284
and byte [edi + 0x1f], 0
push edi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
test eax, eax
jle 0x401277
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
test eax, eax
jle 0x401269
lea eax, [ebp - 0x100c]
push edi
push eax
call fcn.0040109f
pop ecx
test eax, eax
pop ecx
jne 0x401277
lea eax, [ebp - 0x100c]
push 0x403128
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x100c]
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
inc dword [ebp + 8]
add edi, 0x20
mov eax, dword [ebp + 8]
cmp eax, dword [ebx]
jl 0x40121e
push 1
pop edi
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x100c]
push eax
push edi
push 0
push esi
call section..text
pop ecx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4012b7
xor edi, edi
push esi
call section..text
pop ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012ce
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
jmp 0x4012e8
movzx eax, word [ebp + 0x10]
push dword [ebp + 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov esi, eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push eax
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
push esi
mov dword [ebp + 0x14], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x401358
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, ebx
je 0x401358
lea eax, [ebp - 4]
push ebx
push eax
push esi
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 1
pop ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_FreeResource]
pop edi
mov eax, ebx
pop esi
pop ebx
leave
ret
Function at 0x401410
Capabilities:
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x660
push esi
push edi
jmp 0x401433
lea eax, [ebp - 0x15c]
push 0x104
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov edi, 0x403040
push edi
call section..text
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
pop ecx
push eax
lea eax, [ebp - 0x15c]
push eax
call esi
push edi
call section..text
pop ecx
xor edi, edi
push edi
push 0x80
push 2
push edi
push 1
lea eax, [ebp - 0x15c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, edi
mov dword [ebp + 8], eax
je 0x401599
push ebx
mov ebx, 0x403010
push ebx
call section..text
pop ecx
push eax
lea eax, [ebp - 0x660]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push ebx
call section..text
pop ecx
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x660]
push eax
call esi
mov ebx, 0x40301c
push ebx
call section..text
pop ecx
push eax
lea eax, [ebp - 0x660]
push eax
call esi
push ebx
call section..text
pop ecx
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x660]
push eax
call esi
mov ebx, 0x40302c
push ebx
call section..text
pop ecx
push eax
lea eax, [ebp - 0x660]
push eax
call esi
push ebx
call section..text
pop ecx
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x660]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
lea eax, [ebp - 0x660]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push 0x44
lea eax, [ebp - 0x58]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
mov dword [ebp - 0x2c], 1
mov word [ebp - 0x28], di
push eax
lea eax, [ebp - 0x58]
push eax
push edi
push edi
push pe_nt_image_headers32
push edi
push edi
lea eax, [ebp - 0x15c]
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
pop ebx
test eax, eax
je 0x401599
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x14]
call esi
pop edi
pop esi
leave
ret