joyce8/EMBER2024-capa huggingface dataset:
Function at 0x417aca
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push edi
push esi
push ebx
sub esp, 0x254
mov edi, dword [esp + 0x264]
push 0x107
lea ebx, [esp + 8]
push ebx
call sub.KERNEL32.dll_GetWindowsDirectoryA
push 0x43e540
push ebx
call sub.msvcrt.dll_strcat
lea eax, [esp + 0x11c]
push eax
push ebx
call sub.KERNEL32.dll_FindFirstFileA
pop ecx
cmp eax, 0xffffffff
mov esi, eax
pop ebx
je 0x417b2d
push 0x140
lea ebx, [esp + 0x118]
push ebx
call edi
pop eax
pop edx
push ebx
push esi
call sub.KERNEL32.dll_FindNextFileA
test eax, eax
jne 0x417b0b
push esi
call sub.KERNEL32.dll_FindClose
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [esp], eax
push 4
lea eax, [esp + 4]
push eax
call edi
push edi
call fcn.00418897
call fcn.00417a94
add esp, 0x260
pop ebx
pop esi
pop edi
ret

Function at 0x417dea
Capabilities:
Get file size

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x10
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [esp + 0x3c]
call sub.KERNEL32.dll_CreateFileA
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
je 0x417ea2
push 4
push 1
call fcn.00401771
mov dword [eax], ebx
mov ebp, eax
test esi, esi
pop eax
pop edx
je 0x417e3b
push esi
push ebx
call sub.KERNEL32.dll_GetFileSize
mov dword [esi + 4], eax
mov eax, dword [esp + 0x2c]
or eax, edi
je 0x417ea0
lea eax, [esp + 8]
push eax
lea eax, [esp + 4]
push eax
push 0
push ebx
call sub.KERNEL32.dll_GetFileTime
test edi, edi
je 0x417e77
push 0
push 0x989680
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.00434e10
add eax, 0x49ef6f00
add esp, 0x10
mov dword [edi], eax
cmp dword [esp + 0x2c], 0
je 0x417ea0
push 0
push 0x989680
push dword [esp + 0x14]
push dword [esp + 0x14]
call fcn.00434e10
add esp, 0x10
add eax, 0x49ef6f00
mov edx, dword [esp + 0x2c]
mov dword [edx], eax
mov eax, ebp
add esp, 0x10
pop ebx
pop esi
pop edi
pop ebp
ret

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

Disassembly:
push dword [esp + 4]
call sub.KERNEL32.dll_GetFileAttributesA
xor edx, edx
cmp eax, 0xffffffff
je 0x41809b
and eax, 0x10
cmp eax, 1
sbb edx, edx
add edx, 2
mov eax, edx
ret

Function at 0x418197
Capabilities:
Get file attributes

Disassembly:
push ebx
sub esp, 0x140
mov ebx, dword [esp + 0x148]
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
inc eax
mov edx, 1
jne 0x4181ce
mov eax, esp
push eax
push ebx
call sub.KERNEL32.dll_FindFirstFileA
xor edx, edx
cmp eax, 0xffffffff
je 0x4181ce
push eax
call sub.KERNEL32.dll_FindClose
mov edx, 2
add esp, 0x140
mov eax, edx
pop ebx
ret
Function at 0x421500
Capabilities:
Hash data with crc32

Disassembly:
push ebx
or edx, 0xffffffff
mov ebx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
test ebx, ebx
je 0x421530
mov edx, dword [0x43c620]
test ecx, ecx
je 0x421530
movzx eax, byte [ebx]
inc ebx
xor al, dl
movzx eax, al
shr edx, 8
xor edx, dword [eax*4 + 0x43c220]
dec ecx
jmp 0x421518
pop ebx
mov dword [0x43c620], edx
not edx
mov eax, edx
ret

Function at 0x425b92
Capabilities:
Query environment variable

Disassembly:
push esi
push ebx
push ecx
push ecx
mov esi, dword [esp + 0x14]
mov dword [esi + 4], 0
push esi
call fcn.00425db2
mov dword [esp + 4], eax
push 0x54
push esi
call fcn.00425d6c
add esp, 0xc
test eax, eax
mov ebx, eax
jne 0x425bd9
push esi
call fcn.00425db5
mov eax, dword [esi]
mov dword [eax + 0x18], 0
mov dword [eax + 0x14], 0x36
mov eax, dword [esi]
push esi
call dword [eax]
pop eax
pop edx
mov dword [ebx + 0x30], 0x3b9aca00
mov eax, dword [esp]
mov dword [esi + 4], ebx
mov dword [ebx], fcn.0042519b
mov dword [ebx + 4], fcn.004252b7
mov dword [ebx + 8], fcn.0042534c
mov dword [ebx + 0xc], fcn.004253dd
mov dword [ebx + 0x10], 0x42547f
mov dword [ebx + 0x14], 0x4254e7
mov dword [ebx + 0x18], 0x42554f
mov dword [ebx + 0x1c], 0x42581a
mov dword [ebx + 0x20], 0x42594c
mov dword [ebx + 0x24], fcn.00425a75
mov dword [ebx + 0x28], 0x425b5b
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0x54
push str.JPEGMEM
call sub.msvcrt.dll_getenv
pop esi
test eax, eax
mov edx, eax
je 0x425cc1
mov byte [esp + 7], 0x78
lea eax, [esp + 7]
push eax
lea eax, [esp + 4]
push eax
push str._ld_c
push edx
call sub.msvcrt.dll_sscanf
add esp, 0x10
test eax, eax
jle 0x425cc1
movzx eax, byte [esp + 7]
cmp al, 0x6d
sete dl
cmp al, 0x4d
sete al
or eax, edx
test al, 1
je 0x425cb7
imul eax, dword [esp], 0x3e8
mov dword [esp], eax
imul eax, dword [esp], 0x3e8
mov dword [ebx + 0x2c], eax
pop ecx
pop ebx
pop ebx
pop esi
ret
Function at 0x406796
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x4067ba
xor eax, eax
test eax, eax
je 0x4067cd
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x4067cd
xor ecx, ecx
jmp 0x4067d0
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

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

Disassembly:
cmp dword [0x43190c], 0
push esi
jne 0x40692a
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406904
mov dword [ecx*4 + 0x431908], eax
inc ecx
cmp ecx, 0x100
jl 0x4068ff
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x40695b
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x431908]
xor eax, esi
inc ecx
dec edx
jne 0x40693d
pop edi
not eax
pop esi
ret 0xc

Function at 0x433004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43300c
nop
nop
nop
nop
pop eax
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x433030
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
jne 0x43301e
nop
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219

Function at 0x433003
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
call 0x43300c
nop
nop
nop
pop eax
nop
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
jne 0x43301e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
pop eax
nop
nop
nop
add eax, 0x40729f
nop
sub eax, 0x407245
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x43201e
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x401102
Capabilities:
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
sub esp, 0x44
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0x18
mov eax, dword [ebp - 0x18]
mov eax, dword fs:[eax]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
jmp 0x40115e
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
jne 0x40114d
mov dword [ebp - 0xc], 1
jmp 0x401188
mov dword [esp], 0x3e8
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], 0x4060b4
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
lock cmpxchg dword [edx], ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40113c
mov eax, dword [0x4060b8]
cmp eax, 1
jne 0x4011a0
mov dword [esp], 0x1f
call sym.__amsg_exit
jmp 0x4011d3
mov eax, dword [0x4060b8]
test eax, eax
jne 0x4011c9
mov dword [0x4060b8], 1
mov dword [esp + 4], 0x408014
mov dword [esp], 0x40800c
call sym.__initterm
jmp 0x4011d3
mov dword [0x40601c], 1
mov eax, dword [0x4060b8]
cmp eax, 1
jne 0x4011fb
mov dword [esp + 4], 0x408008
mov dword [esp], section..CRT
call sym.__initterm
mov dword [0x4060b8], 2
cmp dword [ebp - 0xc], 0
jne 0x401217
mov dword [ebp - 0x2c], 0x4060b4
mov dword [ebp - 0x30], 0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
xchg dword [eax], edx
mov eax, dword [entry1]
test eax, eax
je 0x401241
mov eax, dword [entry1]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 0
call eax
sub esp, 0xc
call sym.__pei386_runtime_relocator
mov dword [esp], sym.__gnu_exception_handler_4
mov eax, dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call eax
sub esp, 4
mov dword [0x406074], eax
mov dword [esp], sym.___mingw_invalidParameterHandler
call sym.__set_invalid_parameter_handler
call sym.__fpreset
mov eax, dword [0x406004]
mov dword [esp + 4], 0x406008
mov dword [esp], eax
call sym._duplicate_ppstrings
call sym.___main
mov eax, dword [0x403028]
mov edx, dword [0x40600c]
mov dword [eax], edx
mov ecx, dword [0x40600c]
mov edx, dword [0x406008]
mov eax, dword [0x406004]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.wmain
mov dword [0x406014], eax
mov eax, dword [0x406018]
test eax, eax
jne 0x4012d0
mov eax, dword [0x406014]
mov dword [esp], eax
call sym._exit
mov eax, dword [0x40601c]
test eax, eax
jne 0x4012de
call sym.__cexit
mov eax, dword [0x406014]
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret
Function at 0x4012eb
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x40604c], 1
mov dword [0x406050], 1
mov dword [0x406054], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x40132c
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40134f
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x401371
cmp eax, 0x20b
je 0x401396
jmp 0x4013c1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x401383
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4013c6
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x4013ae
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4013c6
mov eax, 0
leave
ret

Function at 0x401800
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
lea eax, [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [esp], 2
call sym.___acrt_iob_func
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov ebx, dword [ebp - 0xc]
mov dword [esp], 2
call sym.___acrt_iob_func
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._vfprintf
call sym._abort

Function at 0x4023d4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x4023f3
mov eax, 0
jmp 0x402437
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x402416
mov eax, 0
jmp 0x402437
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp ax, 0x10b
je 0x402432
mov eax, 0
jmp 0x402437
mov eax, 1
leave
ret
Function at 0x402439
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0xc]
add eax, edx
add eax, 0x18
mov dword [ebp - 4], eax
jmp 0x402498
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp + 0xc], eax
jb 0x402490
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x402490
mov eax, dword [ebp - 4]
jmp 0x4024ac
add dword [ebp - 8], 1
add dword [ebp - 4], 0x28
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 8], eax
jb 0x40246d
mov eax, 0
leave
ret
Function at 0x401cc0
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5652c2
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x5c2f60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x21c], 0
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov dword [ebp - 0x224], esi
mov word [esi], ax
push 0x208
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x21c], 1
push eax
call fcn.005436e0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401d55
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00402310
push str.Foxit_Software
mov ecx, esi
call fcn.00401e70
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x401d89
mov ecx, dword [esi]
call fcn.00406bd0
test eax, eax
jne 0x401da1
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x401d9c
mov ecx, dword [esi]
call fcn.00406ca0
push str.Foxit_Phantom_
mov ecx, esi
call fcn.00401e70
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x401db7
mov ecx, dword [esi]
call fcn.00406bd0
test eax, eax
jne 0x401dcf
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x401dca
mov ecx, dword [esi]
call fcn.00406ca0
push str.Foxit_Service_
mov ecx, esi
call fcn.00401e70
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x401de5
mov ecx, dword [esi]
call fcn.00406bd0
test eax, eax
jne 0x401dfd
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x401df8
mov ecx, dword [esi]
call fcn.00406ca0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00540fa1
mov esp, ebp
pop ebp
ret
Function at 0x404980
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov eax, edi
shr eax, 4
inc eax
push 6
movzx eax, ax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x4049a9
pop edi
pop ebx
pop ebp
ret
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4049bf
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4049b6
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and edi, 0xf
jbe 0x4049f2
nop
cmp esi, ecx
jae 0x4049b6
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edi, 1
jne 0x4049e0
cmp esi, ecx
jae 0x4049b6
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x404a10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
xor cl, cl
test eax, eax
je 0x404b1a
test eax, 0xffff0000
jne 0x404b1a
push esi
push edi
movzx edi, ax
push edi
call fcn.004092cd
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x404b16
mov eax, edi
shr eax, 4
push 6
inc eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp + 8], eax
test eax, eax
je 0x404b16
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x404b16
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x404b16
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and edi, 0xf
jbe 0x404aa9
cmp esi, ecx
jae 0x404b16
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edi, 1
jne 0x404a97
cmp esi, ecx
jae 0x404b16
movzx eax, word [esi]
test ax, ax
je 0x404b16
mov edx, dword [ebx]
mov edi, eax
mov dword [ebp + 8], eax
mov ecx, 1
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or ecx, eax
jge 0x404adc
push edi
mov ecx, ebx
call fcn.00403490
mov edx, dword [ebx]
movzx eax, word [esi]
jmp 0x404adf
mov eax, dword [ebp + 8]
movzx ecx, ax
lea eax, [esi + 2]
push ecx
push eax
push edi
push edx
call fcn.0054b0da
add esp, 0x10
cmp eax, 0x50
ja case.0x404afd.1
movzx eax, byte [eax + 0x404b48]
jmp dword [eax*4 + 0x404b38]
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x404b2d
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + edi*2], cx
pop edi
mov cl, 1
pop esi
mov al, cl
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.004081b3
call fcn.00408199
push 0x80070057
call fcn.00403420
nop
add al, 0x4b
inc eax
add byte [ebx], ah
dec ebx
inc eax
add byte [eax], ch
dec ebx
inc eax
add byte [eax], ch
dec ebx
inc eax
add byte [eax], al
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ecx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [eax]
int3
Function at 0x4054d0
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
lea edi, [ecx + 4]
mov dword [ebp - 8], 0
push edi
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x405521
mov ecx, dword [ebp + 8]
lea eax, [ebp - 8]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
mov dword [ebp - 8], edi
mov dword [ebp - 4], ecx
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x405530
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x5c2f60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push dword [ebp + 0xc]
mov edi, ecx
push eax
lea eax, [ebp - 0x20c]
push str._s_failed_w_err_0x_08lx
push eax
call fcn.004055d0
add esp, 0x10
mov dword [ebp - 0x214], 0
add edi, 4
mov dword [ebp - 0x210], 0
push edi
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x4055bd
push 0
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x214]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00540fa1
mov esp, ebp
pop ebp
ret 8
Function at 0x405910
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56572b
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x5c2f60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x234], ebx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.005436e0
add esp, 0xc
mov dword [ebp - 0x220], 0
xor eax, eax
mov dword [ebp - 0x21c], 7
lea ecx, [ebp - 0x230]
mov word [ebp - 0x230], ax
push 1
push 0x5a618c
call fcn.00402310
push 0x104
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4059c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.00404cf0
add esp, 8
jmp 0x405acf
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4059f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.00404cf0
add esp, 8
jmp 0x405acf
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00401e70
push 0x5a618c
lea ecx, [ebp - 0x230]
call fcn.00401e70
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push 0
push 0x5a5bb8
push 0
push 0
push eax
push 1
push 2
push 0x110
push 0xf01ff
push esi
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x405a6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed_w_err_0x_08lx_n
call fcn.00404cf0
jmp 0x405ac2
push esi
call ebx
mov esi, dword [ebp - 0x234]
push esi
push str._s_is_installed._n
call fcn.00404cf0
add esp, 8
push 0x114
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x405aa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5a6190
jmp 0x405abd
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x405ac5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService_failed_w_err_0x_08lx_n
call fcn.00403530
add esp, 8
push edi
call ebx
test esi, esi
je 0x405acf
push esi
call ebx
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x405b0b
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405b01
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405b27
push edx
push ecx
call fcn.00540fb2
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00540fa1
mov esp, ebp
pop ebp
ret
call fcn.00547145
int3