joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4071b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x423078
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x42b6d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebx + 0x44], 0
je 0x40735e
cmp byte [ebx + 0x49], 0
je 0x40735e
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, ebx
call edx
cmp eax, 0xffffffff
je 0x407352
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x2c], 0
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 8
cmp ecx, 0x10
jae 0x407225
lea eax, [ebp - 0x2c]
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x407242
lea edx, [ebp - 0x2c]
mov eax, edx
add edx, dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x44]
mov esi, dword [ecx]
lea edi, [ebp - 0x30]
push edi
push edx
push eax
lea eax, [ebx + 0x4c]
push eax
mov eax, dword [esi + 0x18]
call eax
sub eax, 0
je 0x407279
dec eax
je 0x40727d
sub eax, 2
lea ecx, [ebp - 0x2c]
je 0x407359
call fcn.00401390
xor al, al
jmp 0x407360
mov byte [ebx + 0x49], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x40728d
lea edx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, edx
je 0x4072ba
cmp edi, 0x10
jae 0x40729c
lea eax, [ebp - 0x2c]
mov ecx, dword [ebx + 0x54]
push ecx
push esi
push 1
push eax
call fcn.0040d539
add esp, 0x10
cmp esi, eax
jne 0x40734a
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
cmp byte [ebx + 0x49], 0
je 0x407356
test esi, esi
jne 0x407236
mov ecx, dword [ebp - 0x1c]
or edx, 0xffffffff
sub edx, ecx
cmp edx, 8
jbe 0x40737b
lea esi, [ecx + 8]
cmp esi, 0xfffffffe
ja 0x40737b
cmp edi, esi
jae 0x407333
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.00401830
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
test esi, esi
je 0x407236
mov ecx, eax
cmp edi, 0x10
jae 0x40730f
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x40732a
lea eax, [ebp - 0x2c]
mov byte [eax + esi], 0
jmp 0x407230
test esi, esi
jne 0x407305
mov dword [ebp - 0x1c], esi
cmp edi, 0x10
jae 0x407342
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x407230
lea ecx, [ebp - 0x2c]
call fcn.00401390
xor al, al
jmp 0x407360
lea ecx, [ebp - 0x2c]
call fcn.00401390
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040b4ad
mov esp, ebp
pop ebp
ret
push str.string_too_long
call fcn.0040a9c8
int3
Function at 0x407670
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422ceb
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x42b6d0]
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], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.0040b019
push 4
mov dword [ebp - 4], 0
call fcn.0040be7d
mov edi, eax
add esp, 4
test edi, edi
je 0x4076ec
call fcn.0040aef1
mov dword [edi], eax
call fcn.0040acb0
push 0
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.0040afda
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x4076e2
inc eax
mov dword [ebx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.0040b002
jmp 0x4076ee
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 0x4092c0
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4230e8
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x42b6d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov ebx, ecx
mov dword [ebp - 0x80], eax
mov dword [ebp - 4], eax
cmp dword [ebp + 0x1c], 0x10
mov byte [ebp - 0x7c], al
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], 0x67452301
mov dword [ebp - 0x2c], 0xefcdab89
mov dword [ebp - 0x28], 0x98badcfe
mov dword [ebp - 0x24], 0x10325476
jae 0x409325
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp + 0x18]
lea esi, [ebp - 0x7c]
call fcn.00409080
mov ecx, esi
call fcn.00409130
mov eax, esi
push eax
call fcn.00409210
cmp dword [ebp + 0x1c], 0x10
jb 0x409352
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040be21
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040b4ad
mov esp, ebp
pop ebp
ret

Function at 0x40b4ad
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42b6d0]
jne 0x40b4b7
repz ret
jmp fcn.0041110c
Function at 0x415d2c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x415d53
call fcn.0040e2db
mov dword [eax], esi
call fcn.0040e2c8
push 0x16
pop esi
mov dword [eax], esi
call fcn.004134ec
mov eax, esi
jmp 0x415da8
test dword [ebp + 0xc], 0xfffffff9
jne 0x415d39
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x415d80
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040e2ee
pop ecx
call fcn.0040e2c8
mov eax, dword [eax]
jmp 0x415da8
test al, 0x10
jne 0x415da6
test al, 1
je 0x415da6
test byte [ebp + 0xc], 2
je 0x415da6
call fcn.0040e2db
mov dword [eax], 5
call fcn.0040e2c8
mov dword [eax], 0xd
jmp 0x415d77
xor eax, eax
pop esi
pop ebp
ret

Function at 0x416f88
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42b6d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00411da1
and dword [ebp - 0x14], 0
cmp dword [0x42d9b0], 0
mov dword [ebp - 0x18], eax
jne 0x41703b
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4170e3
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x4170e3
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x42d9b0], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x42d9b4], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x42d9b8], eax
call edi
push eax
call esi
mov dword [0x42d9c0], eax
test eax, eax
je 0x41703b
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x42d9bc], eax
mov eax, dword [0x42d9bc]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x417094
cmp dword [0x42d9c0], ecx
je 0x417094
push eax
call esi
push dword [0x42d9c0]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x417094
test ebx, ebx
je 0x417094
call edi
test eax, eax
je 0x41708b
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41708b
test byte [ebp - 8], 1
jne 0x417094
or dword [ebp + 0x10], 0x200000
jmp 0x4170c7
mov eax, dword [0x42d9b4]
cmp eax, dword [ebp - 0x18]
je 0x4170c7
push eax
call esi
test eax, eax
je 0x4170c7
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4170c7
mov eax, dword [0x42d9b8]
cmp eax, dword [ebp - 0x18]
je 0x4170c7
push eax
call esi
test eax, eax
je 0x4170c7
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x42d9b0]
call esi
test eax, eax
je 0x4170e3
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x4170e5
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b4ad
leave
ret
Function at 0x4019c0
Capabilities:
Terminate process

Disassembly:
call fcn.004012e3
push 0x5c
push 0x401a08
call fcn.00402328
and dword [ebp - 0x24], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_1.dll_GetStartupInfoA]
jmp 0x403310
mov dword [0x405380], ebx
jmp 0x401a79
test edi, edi
je 0x401b21
jmp 0x401af7
push 0xa
pop eax
jmp 0x401b39
mov edx, 0x405020
mov ecx, edi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x40332d
cmp dword [0x405018], ebx
je 0x403338
cmp dword [0x405018], 0
jne 0x4019e8
mov dword [0x405018], ebx
push 0x401ae0
push 0x401ad4
call fcn.00401381
pop ecx
pop ecx
test eax, eax
jne 0x403416
cmp dword [0x405018], ebx
jne 0x401a9c
push 0x401ad0
push 0x401ac8
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x405018], 2
test esi, esi
jne 0x401aa9
xor eax, eax
mov ecx, 0x405020
xchg dword [ecx], eax
cmp dword [0x405378], 0
jne 0x403355
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
mov edi, dword [ebp - 0x24]
jmp 0x401af0
mov cl, byte [esi]
cmp cl, 0x20
jbe 0x401b19
cmp cl, 0x22
je 0x4033a9
movzx eax, cl
push eax
call dword [sym.imp.msvcrt.dll__ismbblead]
pop ecx
test eax, eax
jne 0x4033ba
inc esi
mov dword [ebp - 0x20], esi
jmp 0x401af0
test cl, cl
jne 0x4019f3
mov al, byte [esi]
test al, al
jne 0x403383
test byte [ebp - 0x40], 1
je 0x401a00
movzx eax, word [ebp - 0x3c]
push eax
push esi
push 0
push 0x400000
call fcn.00401b51
jmp 0x403394
mov dword [ebp - 4], 0xfffffffe
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov edi, dword [eax + 4]
xor esi, esi
jmp 0x401a30
cmp eax, edi
jne 0x403345
mov esi, ebx
jmp 0x401a45
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x401a79
push 0x3e8
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x401a30
push 0x405378
call fcn.00403f58
pop ecx
test eax, eax
je 0x401ab6
push 0
push 2
push 0
mov esi, dword [0x405378]
mov ecx, esi
call dword [0x406154]
call esi
jmp 0x401ab6
cmp al, 0x20
ja 0x401b2b
inc esi
mov dword [ebp - 0x20], esi
jmp 0x401b21
mov dword [0x40537c], eax
cmp dword [0x405008], 0
jne 0x4033f2
push eax
call dword [sym.imp.msvcrt.dll_exit]
xor eax, eax
test edi, edi
sete al
mov edi, eax
mov dword [ebp - 0x24], edi
jmp 0x401b00
inc esi
mov dword [ebp - 0x20], esi
jmp 0x401b13
cmp dword [0x405380], 0
jne 0x403406
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x40537c]
mov dword [ebp - 4], 0xfffffffe
jmp 0x403422
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.00402370
ret
Function at 0x401e89
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
lea eax, [ebp - 4]
xor esi, esi
push eax
push 0x20019
push esi
push 0x401128
push 0x80000001
mov dword [ebp - 0xc], esi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
jmp 0x403276
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push 0x20019
push esi
push 0x401128
push 0x80000002
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x401f1c
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push 0x20019
push esi
push 0x401f90
push 0x80000001
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x40328b
lea eax, [ebp - 4]
push eax
push 0x20019
push esi
push 0x401f90
push 0x80000002
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x401f7f
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, 0x4032b4
push 4
pop edi
test eax, eax
je 0x401eb8
jmp 0x401edb
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x401f3e

Function at 0x402295
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x4022f8
call fcn.0040132c
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x4022ea
cmp eax, 0xffffffff
je 0x4022ea
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x4022e3
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x4022e3
cmp edx, 0x10000000
jae 0x4022e3
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
call fcn.00402314
ret 4
Function at 0x402e7b
Capabilities:
Query or enumerate registry value
Set environment variable

Disassembly:
push esi
push 0x401198
call dword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_SetEnvironmentVariableW]
test eax, eax
je 0x402f84
call fcn.00401995
xor edi, edi
inc edi
test al, al
je 0x401400
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_IsTSAppCompatOn]
test eax, eax
jne 0x402f9d
cmp dword [ebp - 0x214], esi
jne 0x402fc5
mov ecx, dword fs:[0x30]
mov eax, dword [0x7ffe02d8]
cmp eax, dword [ecx + 0x1d4]
jne 0x402fe6
call fcn.00401995
push edi
xor ebx, ebx
test al, al
push esi
sete bl
push ebx
push esi
push esi
push 0x401118
call fcn.00401470
test eax, eax
jne 0x401456
push edi
push esi
push ebx
push edi
push 0x4010e8
push 0x401118
call fcn.00401470
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401940
mov esp, ebp
pop ebp
ret
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x405030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x218]
mov edi, 0x20019
push eax
push edi
xor esi, esi
mov ebx, 0x80000002
push esi
push 0x403008
push ebx
mov dword [ebp - 0x214], esi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x4013d2
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 4
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x220]
push eax
push esi
push 0x40306c
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
cmp dword [ebp - 0x214], esi
je 0x4013d2
lea eax, [ebp - 0x218]
push eax
push edi
push esi
push 0x403090
push ebx
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x402f79
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0x208
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x220]
push eax
push esi
push 0x4030e4
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x402f62
cmp word [ebp - 0x210], si
jne 0x402f68
mov dword [ebp - 0x214], esi
push dword [ebp - 0x218]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
jmp 0x4013d2
mov dword [ebp - 0x214], esi
jmp 0x4013d2
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
cmp eax, 0xcb
je 0x4013e6
xor eax, eax
inc eax
jmp 0x401458
push edi
push edi
push edi
push esi
push esi
mov ebx, 0x403104
push ebx
call fcn.00401470
test eax, eax
jne 0x401400
push edi
push edi
push edi
push edi
push esi
push ebx
call fcn.00401470
jmp 0x401400
push esi
push 3
push esi
push esi
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.00401780
test eax, eax
je 0x401424
xor eax, eax
jmp 0x401458
call fcn.00401995
test al, al
je 0x401424
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_ProcesRemoteSessionInitialCommand]
test al, al
je 0x402fdf
jmp 0x401424
Function at 0x40362c
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, ecx
mov ebx, edx
mov ecx, 0x4034ec
mov dword [ebp - 4], edi
call fcn.00401e30
mov dword [ebx], eax
test eax, eax
je 0x4036b2
push esi
push eax
call dword [sym.imp.api_ms_win_core_string_obsolete_l1_1_0.dll_lstrlenW]
push edi
mov esi, eax
call dword [sym.imp.api_ms_win_core_string_obsolete_l1_1_0.dll_lstrlenW]
add esi, eax
lea esi, [esi*2 + 4]
push esi
push 0x40
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4036b1
push dword [ebp - 4]
shr esi, 1
mov ecx, edi
mov edx, esi
call fcn.004021d4
push 0x4036b8
mov edx, esi
mov ecx, edi
call fcn.00403515
push dword [ebx]
mov edx, esi
mov ecx, edi
call fcn.00403515
push edi
push 0x4034ec
call dword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_SetEnvironmentVariableW]
push edi
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
xor eax, eax
inc eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4039f5
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
lea eax, [ebp - 4]
xor esi, esi
push eax
push 0x20019
push esi
push 0x401128
push 0x80000001
mov dword [ebp - 0xc], esi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, 0x403a9c
push 4
pop edi
test eax, eax
jne 0x403a4e
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push 0x20019
push esi
push 0x401f90
push 0x80000001
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x403a8f
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403acf
Capabilities:
Persist via winlogon helper dll registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
lea eax, [ebp - 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x28]
xor ebx, ebx
push eax
push 0x20019
push ebx
push 0x401128
push 0x80000002
mov dword [edi], ebx
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x403baa
lea eax, [ebp - 0xc]
push eax
push 0x20019
push ebx
push 0x403bd8
push 0x80000002
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x403ba1
mov eax, dword [ebp + 0x24]
mov ebx, dword [ebp + 0x18]
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x1c]
push ebx
push esi
push 0x401118
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x403b98
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x20]
lea eax, [ebp - 0x14]
push eax
push esi
push 0x403bb8
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x403b98
mov eax, dword [ebx]
cmp eax, dword [ebp - 0x14]
jne 0x403b98
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jne 0x403b98
push eax
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x403b98
mov dword [edi], 1
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
Function at 0x403c69
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x405030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, ecx
mov dword [ebp - 0x34], edx
mov ecx, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp + 0xc]
mov ebx, esi
push edi
mov dword [ebp - 0x2c], eax
mov edi, esi
mov dword [ebp - 0x3c], ecx
push esi
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x28], 7
push ecx
push esi
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push edi
push dword [eax + 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumValueW]
test eax, eax
jne 0x403d0f
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
cmp eax, ebx
jle 0x403d1f
mov dword [ebp - 0x38], eax
lea ebx, [ebp - 0x14]
lea eax, [ebp - 0x24]
push 7
mov edx, eax
pop ecx
sub ebx, edx
test ecx, ecx
je 0x403cf5
movzx edx, word [ebx + eax]
test dx, dx
je 0x403cf1
mov word [eax], dx
add eax, 2
dec ecx
jne 0x403cdb
test ecx, ecx
jne 0x403cff
sub eax, 2
mov ecx, 0x8007007a
jmp 0x403d01
mov ecx, esi
xor edx, edx
mov word [eax], dx
test ecx, ecx
js 0x403d2d
mov ebx, dword [ebp - 0x38]
jmp 0x403d1f
mov ecx, 0x103
cmp eax, ecx
je 0x403d34
cmp eax, 0xea
jne 0x403d52
inc edi
cmp edi, 0xffffffff
jae 0x403d58
mov eax, dword [ebp - 0x2c]
jmp 0x403c98
mov esi, 0x10a
jmp 0x403d58
test ebx, ebx
je 0x403d56
push dword [ebp - 0x3c]
lea eax, [ebp - 0x24]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push esi
push eax
mov eax, dword [ebp - 0x2c]
push dword [eax + 4]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov esi, eax
jmp 0x403d58
mov esi, ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401940
mov esp, ebp
pop ebp
ret 8

Function at 0x403f0e
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x403f4c
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x403f44
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x403f4e
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x403f34
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x404039
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x40404f
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x40406a
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret