joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406118
push 0x4015a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x20], 1
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov ecx, 6
xor eax, eax
lea edi, [ebp - 0x3c]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
push str.JHookLdrSingleInstance
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x409e88], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401072
push str.JHOOKLDR:_already_running._r_n
call fcn.00401210
add esp, 4
jmp 0x401199
call fcn.00401220
test eax, eax
je 0x401199
mov esi, dword [ebp + 8]
push esi
call fcn.004012c0
add esp, 4
mov dword [ebp - 0x1c], eax
cmp ax, bx
jne 0x4010a5
push str.JHOOKLDR:_Failed_to_register_the_JHOOKLDR_class._r_n
call fcn.00401210
add esp, 4
jmp 0x401199
mov eax, dword [ebp + 0x14]
push eax
push esi
call fcn.00401340
add esp, 8
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x4010cb
push str.JHOOKLDR:_InitInstance_failed._r_n
call fcn.00401210
add esp, 4
jmp 0x401199
mov ecx, dword [0x409e90]
push ecx
push ebx
mov edx, dword [0x409e9c]
push edx
push 0xffff
call dword [sym.imp.USER32.dll_PostMessageA]
push ebx
push 0x407108
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [0x409e94], eax
cmp eax, ebx
je 0x40111b
push eax
push str.JHOOKLDR:_WinMain_calling_InstallWinEventHook___010x_._r_n
call fcn.00401210
add esp, 8
mov eax, dword [0x409e94]
push eax
call dword [sym.imp.jhook.dll_Ordinal_31]
mov dword [0x409e98], eax
jmp 0x401128
push str.JHOOKLDR:_Could_not_find_the_JFW_window._r_n
call fcn.00401210
add esp, 4
mov ecx, 7
xor eax, eax
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
push 0
push 0
push 0
lea ecx, [ebp - 0x40]
push ecx
call esi
mov dword [ebp - 0x24], eax
test eax, eax
je 0x401197
cmp eax, 0xffffffff
jne 0x401173
push str.JHOOKLDR:_GetMessage_returned__1._r_n
call fcn.00401210
add esp, 4
mov ecx, 7
xor eax, eax
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
jmp 0x401140
lea edx, [ebp - 0x40]
push edx
call ebx
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x20], ecx
mov ecx, 7
xor eax, eax
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
jmp 0x401140
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
call fcn.004011cd
mov esi, dword [ebp - 0x20]
push esi
push str.JHOOKLDR:_exiting._ret_val___i_r_n
call fcn.00401210
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43000c
nop
nop
nop
nop
pop eax
nop
add eax, 0x403d6f
nop
sub eax, 0x403d15
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x430030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
popal
nop
nop
nop
jmp loc.00401219

Function at 0x40c650
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xa000]
push edi
or ebp, 0xffffffff
jmp 0x40c672
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x40c679
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x40c668
mov eax, 1
add ebx, ebx
jne 0x40c68b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x40c680
jne 0x40c69c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x40c680
xor ecx, ecx
sub eax, 3
jb 0x40c6b0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x40c722
mov ebp, eax
add ebx, ebx
jne 0x40c6bb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x40c6c8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40c6ec
inc ecx
add ebx, ebx
jne 0x40c6d8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x40c6cd
jne 0x40c6e9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x40c6cd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40c70c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40c6fd
jmp 0x40c66e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40c70c
add edi, ecx
jmp 0x40c66e
pop esi
lea edi, [esi + 0xa000]
mov eax, dword [edi]
or eax, eax
je 0x40c774
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xc000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xc050]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40c729
mov ecx, edi
jns 0x40c758
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xc054]
or eax, eax
je 0x40c76e
mov dword [ebx], eax
add ebx, 4
jmp 0x40c746
call dword [esi + 0xc064]
mov ebp, dword [esi + 0xc058]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1f7]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x40c7a8
sub esp, 0xffffff80
jmp 0x40a6fc
Function at 0x403b30
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x437958
push 0x4261a0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x43a4a0]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], 0x500
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x403bcb
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x403bb1
mov dword [ebp - 0x28], ebx
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x28]
jmp 0x403bcb
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041fd66
mov esp, ebp
pop ebp
ret

Function at 0x403bf0
Capabilities:
Get session user name
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x437ab8
push 0x4261a0
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x43a4a0]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor eax, eax
xor esi, esi
mov dword [ebp - 4], eax
mov byte [ebp - 0x120], al
push 0x103
push eax
lea eax, [ebp - 0x11f]
push eax
call fcn.00421da0
add esp, 0xc
mov dword [ebp - 0x12c], 0x104
lea ecx, [ebp - 0x12c]
push ecx
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x403ccd
mov edx, 6
mov dword [ebp - 0x130], edx
lea ecx, [ebp - 0x120]
or eax, 0xffffffff
mov dword [ebp - 0x124], ecx
mov esi, edx
dec edx
mov dword [ebp - 0x130], edx
test esi, esi
je 0x403cac
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x4361f0]
inc ecx
jmp 0x403c81
not eax
xor ecx, ecx
cmp eax, 0x39b5d60d
sete cl
mov esi, ecx
jmp 0x403cc7
mov dword [ebp - 0x128], esi
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041fd66
mov esp, ebp
pop ebp
ret
Function at 0x404940
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
mov ecx, 0x4678c0
call fcn.0041e897
mov ebx, eax
mov dword [ebp - 4], 1
test ebx, ebx
je 0x4049f4
test esi, esi
jne 0x4049f4
mov eax, dword [ebp + 8]
shr eax, 4
inc eax
push esi
movzx ecx, ax
push ecx
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
je 0x4049d8
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4049d2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4049d2
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
add eax, esi
and ecx, 0xf
jbe 0x4049c1
cmp esi, eax
jae 0x4049c5
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4049b3
cmp esi, eax
jb 0x4049c9
xor eax, eax
jmp 0x4049d2
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov esi, eax
test eax, eax
jne 0x4049fd
mov edi, dword [ebp - 4]
push edi
mov ecx, 0x4678c0
call fcn.0041e897
mov ebx, eax
inc edi
mov dword [ebp - 4], edi
test ebx, ebx
jne 0x404965
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404b00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x404b18
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x404b4a
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x404b46
cmp esi, eax
jae 0x404b4a
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x404b38
cmp esi, eax
jb 0x404b50
pop esi
xor eax, eax
pop edi
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret
Function at 0x408100
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432a4b
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
mov eax, dword [0x43a4a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x38]
push 0x467090
xor ebx, ebx
push edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x48], ecx
xor esi, esi
mov dword [ebp - 4], ebx
call fcn.0040a350
add esp, 8
mov edi, dword [ebp - 0x38]
cmp dword [edi - 0xc], ebx
je 0x408258
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
lea ebx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.00409f20
mov edi, dword [ebp - 0x44]
test eax, eax
jne 0x40824b
test edi, edi
je 0x408256
lea eax, [ebp - 0xf0]
push eax
call fcn.00408760
lea ecx, [ebp - 0xe0]
push ecx
mov byte [ebp - 4], 3
call fcn.004099b0
mov edx, dword [ebp - 0x48]
add esp, 4
push edx
push eax
call fcn.00409c60
add esp, 8
push eax
call fcn.004099b0
add esp, 4
lea esi, [ebp - 0x30]
lea eax, [ebp - 0xf0]
call fcn.00408800
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
cmp esi, 8
jae 0x4081d7
lea eax, [ebp - 0x30]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4081e0
mov ecx, dword [ebp - 0x30]
sub eax, edx
sar eax, 1
cmp esi, 8
jae 0x4081fa
lea ecx, [ebp - 0x30]
lea eax, [eax + eax + 2]
push eax
push ecx
mov ecx, dword [ebp - 0x34]
push 2
push 0
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
neg esi
sbb esi, esi
inc esi
cmp dword [ebp - 0x1c], 8
jb 0x408228
mov edx, dword [ebp - 0x30]
push edx
call fcn.0041fd5b
add esp, 4
xor eax, eax
lea ecx, [ebp - 0xf0]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], ax
mov byte [ebp - 4], 2
call fcn.004082b0
test edi, edi
je 0x408256
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40828c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40828c
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041fd66
mov esp, ebp
pop ebp
ret
Function at 0x4094f0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43251b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x43a4a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea ecx, [esi + 4]
mov dword [esi], 0x436744
call fcn.0041f8f2
push 4
mov dword [ebp - 4], 0
call fcn.00420245
mov edi, eax
add esp, 4
test edi, edi
je 0x40956c
call fcn.0041ef82
mov dword [edi], eax
call fcn.0041ed41
push 0
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.0041ec76
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x409562
inc eax
mov dword [ebx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.0041ec9e
jmp 0x40956e
xor edi, edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x38], edi
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x409ff0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x670
mov eax, dword [0x43a4a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x436844
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0x436854
push str.Shlwapi.dll
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call edi
mov edi, eax
test esi, esi
je 0x40a13d
test edi, edi
je 0x40a13d
push 0x40
lea eax, [ebp - 0x66c]
push 0
push eax
call fcn.00421da0
xor eax, eax
push 0x206
push eax
mov dword [ebp - 0x62c], eax
mov dword [ebp - 0x628], eax
mov dword [ebp - 0x624], eax
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x20a]
xor ecx, ecx
xor edx, edx
push eax
mov dword [ebp - 0x670], 0x44
mov word [ebp - 0x640], cx
mov word [ebp - 0x20c], dx
call fcn.00421da0
add esp, 0x18
push 0
push 0x25
lea ecx, [ebp - 0x20c]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x436878
lea edx, [ebp - 0x20c]
push edx
call edi
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
xor ecx, ecx
push 0x40e
push ecx
lea edx, [ebp - 0x61a]
push edx
mov word [ebp - 0x61c], cx
call fcn.00421da0
push ebx
lea eax, [ebp - 0x20c]
push eax
push str.__s__start___s_
lea ecx, [ebp - 0x61c]
push 0x208
push ecx
call fcn.004207a1
add esp, 0x20
lea edx, [ebp - 0x62c]
push edx
lea eax, [ebp - 0x670]
push eax
push 0
push 0
push 0x8000000
push 0
push 0
push 0
lea ecx, [ebp - 0x61c]
push ecx
lea edx, [ebp - 0x20c]
push edx
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fd66
mov esp, ebp
pop ebp
ret
Function at 0x40a150
Capabilities:
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4325c0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x43a4a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x20]
xor esi, esi
push 0x4669f8
xor ebx, ebx
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], esi
call fcn.0040a350
add esp, 8
mov ecx, dword [ebp - 0x20]
cmp dword [ecx - 0xc], esi
je 0x40a27a
push 5
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, esi
je 0x40a27a
mov edx, dword [ebp - 0x20]
push 0x17
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
mov dword [ebp - 0x24], eax
cmp ebx, esi
je 0x40a270
lea eax, [ebp - 0x18]
push eax
push esi
push esi
mov dword [ebp - 0x18], esi
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push ebx
call esi
mov eax, dword [ebp - 0x18]
xor ecx, ecx
cmp eax, ecx
je 0x40a25c
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
push eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x11]
lea edi, [ebp - 0x34]
mov byte [ebp - 0x11], cl
call fcn.00405110
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
sub eax, edi
cmp eax, dword [ebp - 0x18]
jne 0x40a24f
test edi, edi
je 0x40a24f
lea ecx, [ebp - 0x18]
push ecx
push eax
push edi
push ebx
call esi
test eax, eax
je 0x40a24f
cmp dword [edi + 4], 2
je 0x40a24f
mov edx, dword [edi + 8]
mov eax, dword [edi]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 2
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
lea esi, [ebp - 0x34]
call fcn.004050e0
mov edi, dword [ebp - 0x1c]
xor ecx, ecx
push ecx
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a2aa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40a2aa
cmp ebx, esi
je 0x40a2b5
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x40a2c3
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ac80
Capabilities:
Check if file exists
Create process on windows
Delete file
Extract resource via kernel32 functions
Move file
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432b88
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x43a4a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x40ae69
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40acc3
sub eax, edx
sar eax, 1
je 0x40ae69
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ae69
push 0x14
push 0x65
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0x40ae5b
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
cmp edi, ebx
je 0x40ae69
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x40ae69
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
je 0x40ae69
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
lea ecx, [ebp - 0x30]
push ecx
push edi
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00405060
add esp, 8
cmp eax, ebx
je 0x40ae42
mov edi, dword [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
cmp edi, esi
je 0x40ae42
mov edx, dword [ebp + 8]
push 0x4368b8
push edx
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], ebx
call fcn.00420bc4
add esp, 0xc
test eax, eax
jne 0x40ae42
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x40ae42
push eax
sub esi, edi
push esi
push 1
push edi
call fcn.00420d62
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
cmp esi, eax
sete cl
push edx
mov esi, ecx
call fcn.00420e49
add esp, 0x14
cmp esi, ebx
je 0x40ae42
lea esi, [ebp - 0x20]
call fcn.004043a0
push 0x6b
mov byte [ebp - 4], 2
call fcn.00404940
add esp, 4
cmp eax, ebx
je 0x40ae3a
push eax
mov eax, 0x6b
mov edi, esi
call fcn.00404510
cmp eax, ebx
je 0x40ae3a
mov edi, dword [ebp - 0x20]
cmp dword [edi - 0xc], ebx
je 0x40ae3a
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call fcn.004043c0
lea esi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.0040d6f0
mov eax, edi
call fcn.0040d5d0
cmp eax, ebx
je 0x40ae32
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40ae32
mov eax, dword [ebp - 0x14]
push 1
push ebx
push ebx
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x18], 1
lea eax, [ebp - 0x14]
call fcn.0040ae80
lea eax, [ebp - 0x20]
call fcn.0040ae80
lea esi, [ebp - 0x30]
call fcn.004050e0
jmp 0x40ae69
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b460
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432780
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x43a4a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
lea eax, [ebp - 0x18]
push 0x466788
xor edi, edi
push eax
xor esi, esi
mov dword [ebp - 4], edi
call fcn.0040a350
mov ecx, dword [ebp - 0x18]
add esp, 8
cmp dword [ecx - 0xc], edi
je 0x40b535
cmp edi, 2
jge 0x40b535
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 0x14]
push edx
push 0
xor eax, eax
push 2
test edi, edi
push 0
setne al
push 0
push 0
push ecx
mov dword [ebp - 0x14], 0
add eax, 0x80000001
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40b52c
mov esi, dword [ebp - 0x14]
mov ecx, esi
mov dword [ebp - 0x28], ecx
test ebx, ebx
jne 0x40b4f8
lea eax, [ebx + 0xd]
jmp 0x40b518
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0
push 0x436a10
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [ebp - 0x28]
xor edx, edx
test eax, eax
sete dl
mov esi, edx
test ecx, ecx
je 0x40b52c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x18]
inc edi
jmp 0x40b4b1
lea eax, [ecx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b575
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret