joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4107b0
Capabilities:
Encode data using xor

Disassembly:
push ecx
cmp edx, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
mov edi, 0x9e3779b9
mov dword [esp + 0x10], edx
mov ebp, edx
mov ebx, edi
jb 0x4108c0
mov eax, 0xaaaaaaab
mul edx
shr edx, 3
mov dword [esp + 0x18], edx
lea ecx, [ecx]
movzx eax, byte [ecx + 7]
movzx edx, byte [ecx + 6]
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 5]
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 4]
add edx, edi
shl eax, 8
lea edi, [edx + eax]
movzx eax, byte [ecx + 0xb]
movzx edx, byte [ecx + 0xa]
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 9]
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 8]
add edx, esi
shl eax, 8
lea esi, [edx + eax]
movzx eax, byte [ecx + 3]
movzx edx, byte [ecx + 2]
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 1]
shl eax, 8
add eax, edx
movzx edx, byte [ecx]
shl eax, 8
add eax, edx
sub eax, esi
sub eax, edi
sub edi, esi
mov edx, esi
shr edx, 0xd
add eax, ebx
xor eax, edx
sub edi, eax
mov edx, eax
shl edx, 8
xor edi, edx
sub esi, edi
sub esi, eax
mov edx, edi
shr edx, 0xd
xor esi, edx
sub eax, esi
sub eax, edi
mov edx, esi
shr edx, 0xc
xor eax, edx
sub edi, esi
sub edi, eax
mov edx, eax
shl edx, 0x10
xor edi, edx
sub esi, edi
sub esi, eax
mov edx, edi
shr edx, 5
xor esi, edx
sub eax, esi
sub eax, edi
mov edx, esi
shr edx, 3
xor eax, edx
sub edi, esi
mov ebx, eax
shl eax, 0xa
sub edi, ebx
xor edi, eax
mov eax, dword [esp + 0x18]
sub esi, edi
mov edx, edi
sub esi, ebx
shr edx, 0xf
xor esi, edx
add ecx, 0xc
sub ebp, 0xc
dec eax
mov dword [esp + 0x18], eax
jne 0x4107e0
mov edx, dword [esp + 0x10]
add esi, edx
dec ebp
cmp ebp, 0xa
ja case.default.0x4108c8
jmp dword [ebp*4 + 0x410998]
movzx eax, byte [ecx + 0xa]
shl eax, 0x18
add esi, eax
movzx edx, byte [ecx + 9]
shl edx, 0x10
add esi, edx
movzx eax, byte [ecx + 8]
shl eax, 8
add esi, eax
movzx edx, byte [ecx + 7]
shl edx, 0x18
add edi, edx
movzx eax, byte [ecx + 6]
shl eax, 0x10
add edi, eax
movzx edx, byte [ecx + 5]
shl edx, 8
add edi, edx
movzx eax, byte [ecx + 4]
add edi, eax
movzx edx, byte [ecx + 3]
shl edx, 0x18
add ebx, edx
movzx eax, byte [ecx + 2]
shl eax, 0x10
add ebx, eax
movzx edx, byte [ecx + 1]
shl edx, 8
add ebx, edx
movzx eax, byte [ecx]
add ebx, eax
sub ebx, esi
sub ebx, edi
sub edi, esi
mov ecx, esi
shr ecx, 0xd
xor ebx, ecx
sub edi, ebx
mov edx, ebx
shl edx, 8
xor edi, edx
sub esi, edi
sub esi, ebx
mov eax, edi
shr eax, 0xd
xor esi, eax
sub ebx, esi
sub ebx, edi
sub edi, esi
mov ecx, esi
shr ecx, 0xc
xor ebx, ecx
sub edi, ebx
mov edx, ebx
shl edx, 0x10
xor edi, edx
sub esi, edi
mov eax, edi
sub esi, ebx
shr eax, 5
xor esi, eax
mov eax, esi
sub ebx, eax
sub ebx, edi
mov ecx, eax
sub edi, eax
shr ecx, 3
xor ebx, ecx
sub edi, ebx
mov edx, ebx
shl edx, 0xa
xor edi, edx
sub eax, edi
sub eax, ebx
shr edi, 0xf
xor eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x4117d0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
mov esi, ecx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4117e7
mov eax, 1
pop esi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4117fd
cmp eax, 5
je 0x4117fd
xor eax, eax
pop esi
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41180d
xor eax, eax
pop esi
ret
movzx eax, al
shr eax, 4
and eax, 1
pop esi
ret

Function at 0x411990
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov dword [ebp - 0xc], ecx
xor eax, eax
push esi
push edi
mov ebx, edx
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea eax, [edi + edi + 4]
add eax, 3
and eax, 0xfffffffc
mov dword [ebp - 8], ebx
call fcn.00409be0
mov ecx, esp
xor esi, esi
test edi, edi
mov byte [ecx], 0xd
mov byte [ecx + 1], 0xa
mov eax, 2
mov byte [ebp - 1], 0
jbe 0x411a04
jmp 0x4119e0
mov ebx, dword [ebp - 8]
nop
lea esp, [esp]
mov dl, byte [esi + ebx]
cmp dl, 0xa
jne 0x4119f3
cmp byte [ebp - 1], 0xd
je 0x4119f3
mov byte [eax + ecx], 0xd
inc eax
mov byte [eax + ecx], dl
inc eax
inc esi
cmp esi, edi
mov byte [ebp - 1], dl
jb 0x4119d8
cmp dl, 0xa
je 0x411a0e
mov byte [eax + ecx], 0xd
inc eax
mov byte [eax + ecx], 0xa
inc eax
push 0
lea edx, [ebp - 0x10]
push edx
push eax
mov byte [eax + ecx], 0
mov eax, dword [ebp - 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x411bc0
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [0x442f48]
sub esp, 0x1c8
test eax, eax
jne 0x411bef
push 0x442f4c
push 0
push str.D_bug
push str.Invurnal
mov dword [0x442f48], 1
call fcn.00417a00
mov eax, dword [0x442f4c]
test eax, eax
je 0x411ca3
mov eax, dword [esp + 0x1d0]
test eax, eax
je 0x411c2e
cmp byte [eax], 0
je 0x411c2e
push eax
mov eax, dword [esp + 0x1d0]
push eax
push 0x43a6e8
lea ecx, [esp + 0xc]
push 0x100
push ecx
call fcn.004104c0
add esp, 0x14
jmp 0x411c4d
mov edx, dword [esp + 0x1cc]
push edx
push 0x43a6e4
lea eax, [esp + 8]
push 0x100
push eax
call fcn.004104c0
add esp, 0x10
mov eax, dword [0x44327c]
test eax, eax
jne 0x411c76
push 1
push 1
push 0
push 0xfffffffffffffffd
lea ecx, [esp + 0x10]
push ecx
push 0x8510007f
call fcn.00410ea0
add esp, 0x1c8
ret 8
lea edx, [esp]
push edx
push 0x43a6b8
lea eax, [esp + 0x108]
push 0xc8
push eax
call fcn.004104c0
add esp, 0x10
lea ecx, [esp + 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x1c8
ret 8

Function at 0x412840
Capabilities:
Create thread

Disassembly:
mov eax, dword [0x442f80]
test eax, eax
jne 0x412882
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x442f54
push 0
push 0
push 0x412890
push 0
push 0
mov dword [0x442f8c], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 1
push eax
mov dword [0x442f80], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
ret
Function at 0x413750
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
shr edx, 2
test edx, edx
mov eax, 0xeeeeeeee
je 0x4137ab
push ebx
push ebp
push esi
push edi
mov edi, edx
mov edx, dword [esp + 0x14]
mov ebx, dword [0x442fcc]
mov esi, edx
and esi, 0xff
mov ebp, dword [ebx + esi*4 + 0x1000]
mov ebx, dword [ecx]
add eax, ebp
lea esi, [eax + edx]
imul eax, eax, 0x21
xor ebx, esi
mov esi, ebx
lea eax, [eax + esi + 3]
mov esi, edx
not esi
shl esi, 0x15
add esi, 0x11111111
shr edx, 0xb
mov dword [ecx], ebx
add ecx, 4
or edx, esi
dec edi
jne 0x413766
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x4158e0
Capabilities:
Get file attributes

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
not eax
shr eax, 4
and eax, 1
ret
Function at 0x4177b0
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [0x443298]
sub esp, 0x20c
test eax, eax
push esi
mov esi, ecx
jne 0x417819
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4178b0
mov eax, dword [esp + 0x224]
mov ecx, dword [esp + 0x220]
mov edx, dword [esp + 0x21c]
push eax
push edx
mov edx, dword [esp + 0xc]
mov dword [eax], ecx
mov eax, dword [esp + 0x220]
mov ecx, dword [esp + 0x21c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jmp 0x4178a1
push 0
push 0
push 0x7fffffff
push edx
push 0x104
lea eax, [esp + 0x1c]
push eax
call fcn.00417fd0
lea ecx, [esp + 4]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x14]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4178b0
mov ecx, dword [esp + 0x214]
mov eax, dword [esp + 0x220]
mov esi, dword [esp + 0x224]
push 0
push 0
push 0x7fffffff
push ecx
push 0x104
lea edx, [esp + 0x1c]
push edx
mov dword [esi], eax
call fcn.00417fd0
mov eax, dword [esp + 0x21c]
mov ecx, dword [esp + 0x218]
push esi
push eax
mov eax, dword [esp + 0xc]
push ecx
push 0
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [esp + 4]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x20c
ret 0x14
Function at 0x417b20
Capabilities:
Set registry value

Disassembly:
sub esp, 0x314
push ebx
mov ebx, dword [esp + 0x31c]
push ebp
push esi
push edi
push 0x104
lea eax, [esp + 0x1c]
mov edi, edx
push eax
mov edx, ebx
xor ebp, ebp
call fcn.00417610
mov eax, dword [0x443298]
test eax, eax
jne 0x417b81
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebx
and cl, 4
lea edx, [esp + 0x14]
push edx
push ebp
neg cl
push 0x20006
push ebp
push ebp
push ebp
lea eax, [esp + 0x34]
push eax
sbb ecx, ecx
neg ecx
add ecx, 0x80000001
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
jmp 0x417bd8
push 0
push 0
push 0x7fffffff
lea edx, [esp + 0x24]
push edx
push 0x104
lea eax, [esp + 0x130]
push eax
call fcn.00417fd0
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebx
and cl, 4
lea edx, [esp + 0x14]
push edx
push 0
neg cl
push 0x20006
push 0
push 0
push 0
lea eax, [esp + 0x138]
push eax
sbb ecx, ecx
neg ecx
add ecx, 0x80000001
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
jne 0x417ca3
mov eax, dword [0x443298]
test eax, eax
jne 0x417c12
mov edx, dword [esp + 0x334]
mov eax, dword [esp + 0x330]
mov ecx, dword [esp + 0x32c]
push edx
mov edx, dword [esp + 0x14]
push eax
push ecx
push esi
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x417c5b
push 0
push 0
push 0x7fffffff
push edi
push 0x104
lea eax, [esp + 0x130]
push eax
call fcn.00417fd0
mov ecx, dword [esp + 0x334]
mov edx, dword [esp + 0x330]
mov eax, dword [esp + 0x32c]
push ecx
push edx
mov edx, dword [esp + 0x18]
push eax
push 0
lea ecx, [esp + 0x12c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
test esi, esi
jne 0x417c9c
test bl, 8
je 0x417c7d
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov esi, eax
test esi, esi
jne 0x417c9c
mov ecx, dword [esp + 0x10]
push ecx
call edi
mov esi, eax
test esi, esi
jne 0x417c9c
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x314
ret 0x10
mov edx, dword [esp + 0x10]
push edx
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x314
ret 0x10
Function at 0x41d1a0
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 4]
mov eax, dword [edi]
inc ecx
test eax, eax
mov dword [edi + 4], ecx
jne 0x41d2e2
push 0x4432cc
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4432cc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x43b490
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x41d2ae
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.StgckWalk
push esi
call ebx
test eax, eax
mov dword [edi + 8], eax
je 0x41d2a7
push str.SyoFnbd
push esi
call ebx
test eax, eax
mov dword [edi + 0xc], eax
je 0x41d2a7
push 0x43b458
push esi
call ebx
test eax, eax
mov dword [edi + 0x10], eax
je 0x41d2a7
push str.SymGetModudeBase
push esi
call ebx
test eax, eax
mov dword [edi + 0x14], eax
je 0x41d2a7
push 0x43b430
push esi
call ebx
test eax, eax
mov dword [edi + 0x18], eax
je 0x41d2a7
push str.SymGe
push esi
call ebx
test eax, eax
mov dword [edi + 0x1c], eax
je 0x41d2a7
push str.S_mf
push esi
call ebx
test eax, eax
mov dword [edi + 0x20], eax
je 0x41d2a7
push 0x43b3fc
push esi
call ebx
test eax, eax
mov dword [edi + 0x24], eax
je 0x41d2a7
push str.SymC_eanuP
push esi
call ebx
test eax, eax
mov dword [edi + 0x28], eax
je 0x41d2a7
push 0x43b3e0
push esi
call ebx
test eax, eax
mov dword [edi + 0x2c], eax
je 0x41d2a7
push str.SymAnum
push esi
call ebx
test eax, eax
mov dword [edi + 0x30], eax
je 0x41d2a7
push str.S_mUnuue2atdSxBls
push esi
call ebx
test eax, eax
mov dword [edi + 0x34], eax
jne 0x41d2ca
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x4432cc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x4432cc
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
ret
push str.LlfmEem_WrmtuDump
push esi
call ebx
push 0x4432cc
mov dword [edi + 0x38], eax
mov dword [edi], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, 1
pop ebx
ret

Function at 0x41d5e0
Capabilities:
Link many functions at runtime

Disassembly:
mov ecx, 0x4432e4
jmp fcn.0041d1a0

Function at 0x41d820
Capabilities:
Get session user name

Disassembly:
sub esp, 0x108
push esi
push edi
lea eax, [esp + 8]
mov edi, ecx
push eax
lea ecx, [esp + 0x10]
push ecx
mov esi, edx
mov dword [esp + 0x10], 0x101
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x41d857
mov cl, byte [eax + 0x43aa28]
mov byte [esp + eax + 0xc], cl
inc eax
test cl, cl
jne 0x41d848
lea edx, [esp + 0xc]
push edx
push str.Uqmr:
push 0x43b4c4
push esi
call edi
add esp, 0x10
pop edi
pop esi
add esp, 0x108
ret

Function at 0x41d880
Capabilities:
Get hostname

Disassembly:
sub esp, 0x14
push esi
push edi
lea eax, [esp + 8]
mov edi, ecx
push eax
lea ecx, [esp + 0x10]
push ecx
mov esi, edx
mov dword [esp + 0x10], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x41d8b4
mov cl, byte [eax + 0x43aa28]
mov byte [esp + eax + 0xc], cl
inc eax
test cl, cl
jne 0x41d8a5
lea edx, [esp + 0xc]
push edx
push str.Bom_uteRz
push 0x43b4c4
push esi
call edi
add esp, 0x10
pop edi
pop esi
add esp, 0x14
ret
Function at 0x41db20
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x64]
push ebx
mov ebx, dword [esp + 0x64]
push ebp
push esi
mov esi, dword [esp + 0x68]
mov ebp, esi
shr ebx, 4
and ebp, 0xf
test eax, eax
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x70], ebx
je 0x41dbb5
mov ecx, 0x13
mov eax, 0x20202020
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov al, 0x64
mov byte [esp + 0x1d], al
mov byte [esp + 0x1e], al
mov cl, 0x2a
mov edi, ebp
lea eax, [esp + ebp + 0x22]
mov byte [esp + 0x18], cl
lea eax, [eax + ebp*2]
mov byte [esp + 0x66], 0
mov byte [esp + 0x1a], 0x3d
mov byte [esp + 0x1c], 0x61
mov byte [esp + 0x1f], 0x72
shr edi, 2
add eax, edi
mov byte [eax], cl
mov byte [eax + 1], cl
mov byte [esp + ebp + 0x56], cl
lea ecx, [esp + 0x18]
push ecx
push 0x43a6e4
push edx
call dword [esp + 0x1c]
add esp, 0xc
test ebp, ebp
je 0x41dbb5
sub esi, ebp
inc ebx
mov dword [esp + 0x70], ebx
test ebx, ebx
jbe 0x41dd00
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
push esi
lea edx, [esp + 0x1c]
push str._09X_
push edx
call ebx
add esp, 0xc
push 0x10
push esi
lea edi, [esp + eax + 0x20]
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x41dcd9
movzx eax, byte [esi + 3]
movzx ecx, byte [esi + 2]
movzx edx, byte [esi + 1]
push eax
movzx eax, byte [esi]
push ecx
push edx
push eax
push str._02P__
push edi
call ebx
movzx ecx, byte [esi + 7]
movzx edx, byte [esi + 6]
push ecx
movzx ecx, byte [esi + 4]
add edi, eax
movzx eax, byte [esi + 5]
push edx
push eax
push ecx
push str._02P__
push edi
call ebx
movzx edx, byte [esi + 0xb]
movzx ecx, byte [esi + 9]
push edx
movzx edx, byte [esi + 8]
add edi, eax
movzx eax, byte [esi + 0xa]
push eax
push ecx
push edx
push str._02P__
push edi
call ebx
movzx ecx, byte [esi + 0xe]
movzx edx, byte [esi + 0xd]
add edi, eax
movzx eax, byte [esi + 0xf]
add esp, 0x48
push eax
movzx eax, byte [esi + 0xc]
push ecx
push edx
push eax
push str._02P__
push edi
call ebx
add edi, eax
mov eax, edi
add esp, 0x18
sub eax, esi
mov ebp, esi
mov dword [esp + 0x74], eax
mov dword [esp + 0x6c], 0x10
movzx ecx, byte [ebp]
push ecx
call dword [sym.imp.MSVCRT.dll_isprint]
add esp, 4
test eax, eax
je 0x41dc8e
mov al, byte [ebp]
jmp 0x41dc90
mov al, 0x2e
mov edx, dword [esp + 0x74]
mov byte [edx + ebp], al
mov eax, dword [esp + 0x6c]
inc ebp
dec eax
mov dword [esp + 0x6c], eax
jne 0x41dc77
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push 0x43a6e4
push ecx
mov byte [edi + 0x10], 0
call dword [esp + 0x1c]
mov eax, dword [esp + 0x7c]
add esp, 0xc
add esi, 0x10
dec eax
mov dword [esp + 0x70], eax
jne 0x41dbc3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc
mov eax, 0x43b584
sub edi, eax
mov cl, byte [eax]
mov byte [edi + eax], cl
inc eax
test cl, cl
jne 0x41dce0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push 0x43a6e4
push eax
call dword [esp + 0x1c]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc
Function at 0x41e3a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
push ebp
mov ebx, edx
push 0x43aa28
push ebx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push 0x1c
lea edx, [esp + 0x14]
push edx
mov dword [eax], 0
push esi
mov dword [ecx], 0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41e48a
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x41e3f7
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41e41b
push ebp
push 0x43aa28
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
test edi, edi
je 0x41e48a
cmp word [edi], 0x5a4d
jne 0x41e48a
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x41e48a
mov ecx, dword [eax + edi]
add eax, edi
cmp ecx, 0x4550
jne 0x41e48a
movzx ebp, word [eax + 6]
movzx ecx, word [eax + 0x14]
sub esi, edi
xor ebx, ebx
test ebp, ebp
lea ecx, [ecx + eax + 0x18]
jbe 0x41e48a
lea eax, [ecx + 0x10]
mov ecx, dword [eax]
mov edx, dword [eax - 8]
cmp ecx, edx
mov edi, dword [eax - 4]
ja 0x41e45f
mov ecx, edx
cmp esi, edi
jb 0x41e469
add ecx, edi
cmp esi, ecx
jbe 0x41e47b
inc ebx
add eax, 0x28
cmp ebx, ebp
jb 0x41e451
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
inc ebx
sub esi, edi
mov dword [edx], ebx
mov dword [eax], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc

Function at 0x41e560
Capabilities:
Create thread

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
push 0x443324
mov esi, edx
mov edi, ecx
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp eax, 1
jne 0x41e5d4
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0xc]
push edx
push ebx
mov dword [esp + 0x28], eax
lea eax, [esp + 0x18]
push eax
push 0x41e5f0
push ebx
push ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
cmp esi, ebx
je 0x41e5d4
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x1c]
push 0x443324
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x1c
ret 8
Function at 0x41e760
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
test edi, edi
mov esi, ecx
je 0x41e771
mov eax, dword [edi]
mov bl, byte [esp + 0x14]
test bl, 1
je 0x41e77d
or eax, 0xffffffff
test bl, 2
je 0x41e7ae
test edx, edx
mov ecx, esi
je 0x41e7ae
push ebp
lea esp, [esp]
movzx ebp, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, ebp
mov esi, dword [esi*4 + 0x43b9f8]
shr eax, 8
xor eax, esi
inc ecx
dec edx
jne 0x41e790
pop ebp
test bl, 4
je 0x41e7b5
not eax
test edi, edi
je 0x41e7bb
mov dword [edi], eax
pop edi
pop esi
pop ebx
ret 8
Function at 0x402ed8
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404600
test esi, esi
jne 0x402f0f
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.004046f0
jmp 0x402f30
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402d74
mov dword [esp], eax
test esi, esi
je 0x402f30
cmp dword [ebx], 0
je 0x402f30
dec esi
jmp 0x402f17
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x40363c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4eb024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4036d4
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4036b4
xor eax, eax
push ebp
push 0x4036ad
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 0x4036f0
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 0x4036b4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x4eb024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4eb024], ax
mov esp, ebp
pop ebp
ret

Function at 0x4043d8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4f004c], 0
je 0x404439
cmp word [0x4f0220], 0xd7b2
jne 0x404401
cmp dword [0x4f0228], 0
jbe 0x404401
mov eax, 0x4f021c
call dword [0x4f0238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4eb070
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 0x404460
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4eb034], 0
jne 0x404455
push 0
push 0x4eb068
push 0x4eb070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4045b4
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.00402b14
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4f004d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x40457c
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc