joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46bd57
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x492f50]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor ebx, ebx
push str.kernel32.dll
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ebx
xor esi, esi
call edi
push str.GetUserDefaultUILanguage
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x46bdf9
call eax
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ebx, 0x3ff
mov edi, 0xfc00
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ecx, cx
and eax, edi
or eax, ecx
push eax
mov dword [ebp - 0x1c], ecx
call esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
call esi
push str.GetSystemDefaultUILanguage
push dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ebx, cx
and eax, edi
or eax, ebx
push eax
call esi
push ebx
mov dword [ebp - 0x34], eax
call esi
mov dword [ebp - 0x30], eax
push 4
xor ebx, ebx
jmp 0x46befb
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x46bea9
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push ebx
push str.Control_PanelDesktopResourceLocale
push SysReAllocString
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x46befc
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x46be9e
cmp dword [ebp - 0x24], 1
jne 0x46be9e
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push 0x47e2dc
push eax
call fcn.0044ac24
add esp, 0xc
cmp eax, 1
jne 0x46be9e
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
push 2
mov dword [ebp - 0x38], eax
pop esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46befc
push str.ntdll.dll
call edi
cmp eax, ebx
je 0x46befc
lea ecx, [ebp - 0x18]
push ecx
push 0x46bd41
push 1
push 0x10
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceLanguagesA]
cmp word [ebp - 0x18], bx
je 0x46befc
movzx eax, word [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
mov dword [ebp - 0x38], eax
push 2
pop esi
mov dword [ebp + esi*4 - 0x3c], 0x800
inc esi
xor edi, edi
cmp esi, ebx
jle 0x46bf22
push dword [ebp + edi*4 - 0x3c]
push dword [ebp + 8]
call fcn.0046bcc2
cmp eax, ebx
pop ecx
pop ecx
jne 0x46bf24
inc edi
cmp edi, esi
jl 0x46bf0b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.00449c1e
leave
ret 4
Function at 0x46bf33
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x4924bc
je 0x46bfef
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x46bfd7
mov esi, dword [ebx + 4]
jmp 0x46bfd1
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x46bfc1
cmp dword [ebp - 0xc], 4
jne 0x46bfc1
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x46bfb9
or dword [eax + 0x9c], ecx
jmp 0x46bfc1
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x46bf85
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x46bf68
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x46c3a9
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x474d41
call fcn.0044c95c
sub esp, 0x11c
mov eax, dword [0x492f50]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x124]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x46c4a2
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x46c476
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.00404830
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.0046c3a9
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.00401510
test bl, bl
jne 0x46c476
or dword [ebp - 4], 0xffffffff
jmp 0x46c3e7
cmp esi, 0x103
je 0x46c486
cmp esi, 0x3f2
jne 0x46c496
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
mov eax, esi
call fcn.00449c1e
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x46cd17
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov dword [ebp - 4], ecx
call fcn.0046b1da
mov esi, dword [eax + 0xc]
push 0xf1
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x46cd57
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 8], eax
je 0x46cd57
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x46cd5b
xor eax, eax
jmp 0x46cdd8
movzx eax, word [esi + 6]
push ebx
shl eax, 2
push edi
push eax
call fcn.0045c25b
mov edi, eax
xor eax, eax
cmp word [esi + 6], ax
pop ecx
jbe 0x46cd89
lea ecx, [esi + 8]
movzx edx, word [ecx]
mov dword [edi + eax*4], edx
movzx edx, word [esi + 6]
inc eax
inc ecx
inc ecx
cmp eax, edx
jl 0x46cd78
movzx eax, word [esi + 6]
mov ecx, dword [ebp - 4]
push eax
push edi
call fcn.0046c95b
push edi
mov ebx, eax
call fcn.0045c286
test ebx, ebx
pop ecx
je 0x46cdcb
movzx ecx, word [esi + 4]
movzx eax, word [esi + 2]
push ecx
lea esi, [ecx + 7]
mov ecx, dword [ebp - 4]
push eax
lea edx, [eax + 7]
push esi
push edx
call fcn.0046cb9d
push dword [ebp + 8]
mov ecx, dword [ebp - 4]
call fcn.0046cc24
mov ebx, eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, ebx
pop ebx
pop esi
leave
ret 4

Function at 0x46d4f6
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x46d52b
cmp edi, dword [esi + 0xc]
jge 0x46d52b
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46d52b
cmp edi, dword [eax + 8]
jge 0x46d52b
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x46d52d
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x46d631
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x46d665
jmp fcn.00459474
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret
Function at 0x46d6d6
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x46d7cf
cmp eax, dword [edi + 0xc]
jge 0x46d7cf
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x46d727
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x46d7b8
cmp dword [ebp + 0xc], ebx
je 0x46d7b8
jmp 0x46d751
push 0x10
call fcn.0046d3c2
cmp eax, ebx
je 0x46d73d
mov ecx, eax
call fcn.0046d628
mov esi, eax
jmp 0x46d73f
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x46d768
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x46d778
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x46d78a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00459474
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.0044c980
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x46d7ca
cmp ecx, dword [esi + 8]
jge 0x46d7ca
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x46d7d0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x710c76
Capabilities:
Encode data using xor

Disassembly:
mov esi, 0x7109ec
sub edx, 0x7259da7d
call fcn.00710cb2
sub eax, eax
xor dword [ebx], esi
add edx, 0x80ae15ba
or eax, edx
add ebx, 1
mov edx, edx
sub edx, edx
and edx, eax
cmp ebx, ecx
jne fcn.00710c76
add edx, 0x707d4b50
ret
Function at 0x406294
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
mov esi, 0x104
lea eax, [ebp - 0x120]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, esi
pop esi
jbe 0x4062b8
xor eax, eax
test eax, eax
je 0x4062ca
cmp byte [ebp + eax - 0x121], 0x5c
je 0x4062ca
xor ecx, ecx
jmp 0x4062cd
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x409014]
lea eax, [ebp + eax - 0x120]
push ecx
push str._s_s.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x120]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
leave
ret 4

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

Disassembly:
cmp dword [0x42229c], 0
push esi
jne 0x4063f0
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 0x4063ca
mov dword [ecx*4 + 0x422298], eax
inc ecx
cmp ecx, 0x100
jl 0x4063c5
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406421
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 + 0x422298]
xor eax, esi
inc ecx
dec edx
jne 0x406403
pop edi
not eax
pop esi
ret 0xc

Function at 0x401767
Capabilities:
Encode data using xor

Disassembly:
adc eax, sym.imp.MSVCRT.dll_fprintf
mov eax, dword [0x4123ac]
add esp, 0xc
test eax, eax
mov byte es:[eax + 0x68], dl
push esp
scasb al, byte es:[edi]
inc eax
lahf
sub byte [0x40c19f], dl
add esp, 8
push 1
call dword [0x40c13d]
nop
xor eax, 0xec818e8b
aaa
add byte [eax], al
add byte [ecx + 0x360278], ah
sbb al, al
mov eax, dword [0x41404d]
je 0x4017bb
push 0x413c40
push eax
jmp 0xfefd0050
mov edx, dword [0xc94118c6]
push edx
push eax
cmp byte [eax + 0x66000040], cl
mov edx, dword [esp + eax]
dec edx
inc ecx
add byte [ebp + 8], ch
sbb byte [ecx], al
mov eax, dword [0xdb9bb115]
push ebx
push esi
mov esi, dword [0x4040c164]
mov word [eax], cx
mov ah, 0xb
cli
add byte [ebp + 0x5d75edc0], al
mov edx, dword [0x411800]
push edx
invalid

Function at 0x401e40
Capabilities:
Terminate process

Disassembly:
call dword [edi]
xchg edx, eax
rol dword [eax - 3], 0x3c
les esi, [esi - 0x15]
push cs
push 0x9cefd278
jmp [edi + esi*8]
push ebp
mov ebp, esp
sub esp, 0x78
push esi
mov esi, dword [ebp + 0xc]
push esi
lea eax, [ebp - 0x4e]
push 0x78
stosd dword es:[edi], eax
push esi
call fcn.004086e0
mov ecx, dword [ebp + 8]
mov edx, dword [0x3a40c0c8]
push eax
pop ecx
sbb dword [ecx - 0x1cf197c0], 0x40
add byte [edx - 1], dl
adc eax, 0x403b4f
mov cl, 0xac
pop es
inc ecx
loopne 0x401dfa
les edx, [eax*4 + 0x500f74c0]
push 0x40d256
call dword [0x40c1c6]
add esp, 8
push esi
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
nop
nop
nop
nop
nop
dec edx
nop
nop
sub dl, byte [eax - 0x74aab670]
invalid
Function at 0x4a3377
Capabilities:
Encode data using xor

Disassembly:
xor eax, 0x5d1e176e
outsb dx, byte [esi]
pop ss
push ds
pop ebp
mov eax, 0x1187f34e
sub eax, 0xad6ac61f
outsd dx, dword [esi]
invalid

Function at 0x4bbca5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4c23b8
cmp edx, dword [eax]
je 0x4bbcc7
add eax, 8
inc ecx
cmp eax, 0x4c2448
jl 0x4bbcb8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4c23b8]
jne 0x4bbdf5
mov eax, dword [0x4c7dc0]
cmp eax, 1
je 0x4bbdcf
test eax, eax
jne 0x4bbcf8
cmp dword [0x4c22e4], 1
je 0x4bbdcf
cmp edx, 0xfc
je 0x4bbdf5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4bbd2f
lea eax, [ebp - 0x1a4]
push 0x4c0508
push eax
call fcn.004bc690
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004bcb20
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4bbd72
lea eax, [ebp - 0x1a4]
push eax
call fcn.004bcb20
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4c0504
push edi
call fcn.004be9f0
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4c04e8
push eax
call fcn.004bc690
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004bc6a0
lea eax, [ebp - 0xa0]
push 0x4c04e4
push eax
call fcn.004bc6a0
push dword [esi + 0x4c23bc]
lea eax, [ebp - 0xa0]
push eax
call fcn.004bc6a0
push 0x12010
lea eax, [ebp - 0xa0]
push 0x4c04bc
push eax
call fcn.004be964
add esp, 0x2c
pop edi
jmp 0x4bbdf5
lea eax, [ebp + 8]
lea esi, [esi + 0x4c23bc]
push 0
push eax
push dword [esi]
call fcn.004bcb20
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x401860
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
push ebx
push ebp
lea eax, [esp + 8]
push eax
xor ebp, ebp
push 0x20019
push ebp
push 0x58daa8
xor ebx, ebx
push reloc.WS2_32.dll_bind
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401944
mov eax, dword [esp + 8]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0x10]
push ecx
push ebp
lea edx, [esp + 0x1c]
push edx
push ebp
push 0x58da88
push eax
call esi
test eax, eax
jne 0x401943
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x401943
push edi
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebp
je 0x401942
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push edi
lea edx, [esp + 0x20]
push edx
push ebp
push 0x58da88
push eax
call esi
test eax, eax
jne 0x401935
cmp dword [esp + 0x18], 7
jne 0x401935
mov esi, edi
cmp word [edi], bp
je 0x401935
mov ebx, dword [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpW]
nop
push ebx
push esi
call ebp
test eax, eax
je 0x40192d
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 + 2], 0
lea esi, [esi + eax*2 + 2]
jne 0x401910
jmp 0x401935
mov dword [esp + 0x1c], 1
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
pop edi
pop esi
mov eax, dword [esp + 8]
cmp eax, ebp
je 0x401953
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
mov eax, ebx
pop ebx
add esp, 0x10
ret 4

Function at 0x402960
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402979
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4029b4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x4029b0
lea ebx, [ebx]
cmp esi, eax
jae 0x4029b4
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4029a0
cmp esi, eax
jb 0x4029ba
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x4041a0
Capabilities:
Get common file path

Disassembly:
mov eax, 0x2004
call fcn.005530f0
mov eax, dword [0x5f8320]
xor eax, esp
mov dword [esp + 0x2000], eax
push ebp
mov ebp, dword [esp + 0x200c]
xor eax, eax
test ebp, ebp
je 0x404276
cmp ax, word [ebp]
jne 0x4041e6
pop ebp
mov ecx, dword [esp + 0x2000]
xor ecx, esp
call fcn.0055189a
add esp, 0x2004
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push esi
push edi
push 0
push 0
call ebx
mov edi, eax
lea ecx, [edi + edi + 2]
push ecx
call fcn.00553026
mov esi, eax
add esp, 4
test esi, esi
je 0x40421c
inc edi
push edi
push esi
call ebx
test eax, eax
jne 0x404220
push esi
call fcn.00552ecf
add esp, 4
xor eax, eax
jmp 0x404273
push 0x1000
lea edx, [esp + 0x14]
push esi
push edx
call fcn.00552e85
push 0x1000
lea eax, [esp + 0x20]
push 0x58de68
push eax
call fcn.00552e45
push 0x1000
lea ecx, [esp + 0x2c]
push ebp
push ecx
call fcn.00552e45
add esp, 0x24
push 8
push 0
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push esi
mov edi, eax
call fcn.00552ecf
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2004]
pop ebp
xor ecx, esp
call fcn.0055189a
add esp, 0x2004
ret

Function at 0x404380
Capabilities:
Link many functions at runtime

Disassembly:
cmp dword [0x5f97bc], 0
je 0x40438f
mov eax, 1
ret
push esi
push str.wintrust.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x4043b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadLibrary_wintrust.dll_error__d_n
call fcn.0055311b
add esp, 8
xor eax, eax
pop esi
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptCATAdminAcquireContext
push esi
call edi
push str.CryptCATAdminReleaseContext
push esi
mov dword [0x5f97b8], eax
call edi
push str.CryptCATAdminCalcHashFromFileHandle
push esi
mov dword [0x5f97b4], eax
call edi
push str.CryptCATAdminEnumCatalogFromHash
push esi
mov dword [0x5f97b0], eax
call edi
push str.CryptCATAdminReleaseCatalogContext
push esi
mov dword [0x5f97ac], eax
call edi
push str.CryptCATCatalogInfoFromContext
push esi
mov dword [0x5f97a8], eax
call edi
push str.WinVerifyTrust
push esi
mov dword [0x5f97a4], eax
call edi
cmp dword [0x5f97b8], 0
mov dword [0x5f97a0], eax
pop edi
je 0x404462
cmp dword [0x5f97b4], 0
je 0x404462
cmp dword [0x5f97b0], 0
je 0x404462
cmp dword [0x5f97ac], 0
je 0x404462
cmp dword [0x5f97a8], 0
je 0x404462
cmp dword [0x5f97a4], 0
je 0x404462
test eax, eax
je 0x404462
mov eax, 1
mov dword [0x5f97bc], eax
pop esi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetProcAddress_error_1_d_n
call fcn.0055311b
add esp, 8
xor eax, eax
pop esi
ret
Function at 0x4097b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, ecx
test ebx, ebx
je 0x409814
test edi, edi
je 0x409814
test eax, eax
jle 0x409814
test ebp, ebp
jle 0x409814
push eax
push 0
push ebx
call fcn.00551820
add esp, 0xc
test ebp, ebp
jle 0x40980e
mov ecx, ebx
sub edi, ebx
mov al, byte [edi + ecx]
mov edx, esi
shr edx, 8
xor al, dl
mov byte [ecx], al
movzx ax, al
add ax, si
mov edx, 0x3193
imul ax, dx
mov edx, 0x58bf
sub dx, ax
inc ecx
sub ebp, 1
movzx esi, dx
jne 0x4097e1
pop edi
pop esi
xor eax, eax
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebp
ret

Function at 0x409870
Capabilities:
Print debug messages
Write file on windows

Disassembly:
mov eax, 0x2258
call fcn.005530f0
mov eax, dword [0x5f8320]
xor eax, esp
mov dword [esp + 0x2254], eax
mov eax, dword [esp + 0x2260]
test eax, eax
je 0x4099f2
cmp dword [0x5f9a98], 1
jne 0x4099f2
lea ecx, [esp + 0x2264]
push ecx
lea edx, [esp + 0x258]
push eax
push edx
call fcn.0055425a
cmp dword [esp + 0x2268], 0
jne 0x4098ea
add esp, 0xc
lea eax, [esp + 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x2254]
xor ecx, esp
call fcn.0055189a
add esp, 0x2258
ret
lea eax, [esp + 0x40]
push eax
call fcn.005541c0
lea ecx, [esp + 0x50]
push ecx
call fcn.005540f8
add esp, 0x14
lea edx, [esp + 0x254]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea edx, [esp + 0x1264]
push str.__ld___s__s__s
push edx
call fcn.005532f9
lea eax, [esp + 0x126c]
add esp, 0x18
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409940
push ebx
sub eax, edx
push esi
push eax
lea ecx, [esp + 0x1260]
push ecx
mov ecx, 0x4e4
lea ebx, [esp + 0x264]
mov dword [esp + 0x10], eax
call fcn.004097b0
push str.v3restore.log
push 0x5f9890
lea edx, [esp + 0x64]
push 0x58f0e4
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x70]
push ecx
call fcn.00553c0f
add esp, 0x20
cmp dword [esp + 0x20], 0x300000
jl 0x4099ab
push 0x58f0dc
lea edx, [esp + 0x58]
push edx
jmp 0x4099b5
push 0x58f0d4
lea eax, [esp + 0x58]
push eax
call fcn.00553aa4
mov esi, eax
add esp, 8
test esi, esi
je 0x4099f0
push esi
push 1
lea ecx, [esp + 0x10]
push 4
push ecx
call fcn.0055395c
mov edx, dword [esp + 0x18]
push esi
push 1
push edx
lea eax, [esp + 0x278]
push eax
call fcn.0055395c
push esi
call fcn.0055377e
add esp, 0x24
pop esi
pop ebx
mov ecx, dword [esp + 0x2254]
xor ecx, esp
call fcn.0055189a
add esp, 0x2258
ret