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

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
lea eax, [esp + 0xc]
push eax
push 0x20019
push 0
push str.SoftwareEnterbrainRGSS2RTP
push 0x80000002
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
push edi
push 0
push esi
call fcn.00401a10
mov ebx, dword [esp + 0x28]
add esp, 0xc
mov ecx, 0x4081b8
mov eax, ebx
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401076
test dx, dx
je 0x401072
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401076
add eax, 4
add ecx, 4
test dx, dx
jne 0x401050
xor eax, eax
jmp 0x40107b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4010f4
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push ecx
push esi
lea edx, [esp + 0x1c]
push edx
push 0
push ebx
add edi, 0xffffffff
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [esp + 0x14], 1
je 0x4010bf
mov eax, 0x4081b8
mov edx, esi
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4010b0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4010c4
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 - 2], 0x5c
jne 0x4010f4
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4010e0
sub eax, edx
sar eax, 1
mov word [esi + eax*2 - 2], cx
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
add esp, 0xc
ret
Function at 0x401a8a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [section..data]
jne 0x401a94
repz ret
jmp fcn.00402108

Function at 0x4027ea
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x40b028]
je 0x402805
inc edi
cmp edi, 0x17
jb 0x4027f6
cmp edi, 0x17
jae 0x402985
push ebp
push 3
call fcn.00404650
cmp eax, 1
pop ecx
je 0x402951
push 3
call fcn.00404650
test eax, eax
pop ecx
jne 0x402839
cmp dword [0x40b010], 1
je 0x402951
cmp ebx, 0xfc
je 0x402984
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x40c058
push ebp
call fcn.004045eb
add esp, 0xc
test eax, eax
je 0x40286f
push esi
push esi
push esi
push esi
push esi
call fcn.00403c89
add esp, 0x14
push 0x104
mov esi, 0x40c071
push esi
push 0
mov byte [0x40c175], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4028b3
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004045eb
add esp, 0xc
test eax, eax
je 0x4028b3
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00403c89
add esp, 0x14
push esi
call fcn.00404560
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4028f8
push esi
call fcn.00404560
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x40c36c
push 0x408934
sub ecx, eax
push ecx
push eax
call fcn.004044a3
add esp, 0x14
test eax, eax
je 0x4028f8
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00403c89
add esp, 0x14
jmp 0x4028fa
xor esi, esi
push 0x408930
push ebx
push ebp
call fcn.00404432
add esp, 0xc
test eax, eax
je 0x40291a
push esi
push esi
push esi
push esi
push esi
call fcn.00403c89
add esp, 0x14
push dword [edi*8 + 0x40b02c]
push ebx
push ebp
call fcn.00404432
add esp, 0xc
test eax, eax
je 0x40293c
push esi
push esi
push esi
push esi
push esi
call fcn.00403c89
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00404275
add esp, 0xc
jmp 0x402984
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x402984
cmp ebp, 0xffffffff
je 0x402984
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x40b02c]
push dword [esi]
call fcn.00404560
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x404275
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00403342
xor ebx, ebx
cmp dword [0x40c618], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x40434b
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40442b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x40442b
push eax
call fcn.004032d4
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40c618], eax
call esi
push eax
call fcn.004032d4
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40c61c], eax
call esi
push eax
call fcn.004032d4
mov dword [0x40c620], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00402577
test eax, eax
pop ecx
pop ecx
je 0x404319
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00403c89
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x40434b
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004032d4
cmp eax, ebx
pop ecx
mov dword [0x40c628], eax
je 0x40434b
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004032d4
pop ecx
mov dword [0x40c624], eax
mov eax, dword [0x40c624]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4043d0
cmp dword [0x40c628], ecx
je 0x4043d0
push eax
call fcn.0040334b
push dword [0x40c628]
mov esi, eax
call fcn.0040334b
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4043d0
cmp edi, ebx
je 0x4043d0
call esi
cmp eax, ebx
je 0x40439d
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40439d
test byte [ebp - 0x18], 1
jne 0x4043d0
lea eax, [ebp - 0x10]
push eax
call fcn.004025ae
test eax, eax
pop ecx
je 0x4043b8
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00403c89
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4043c7
or dword [ebp + 0x10], 0x200000
jmp 0x40440b
or dword [ebp + 0x10], 0x40000
jmp 0x40440b
mov eax, dword [0x40c61c]
cmp eax, dword [ebp - 8]
je 0x40440b
push eax
call fcn.0040334b
cmp eax, ebx
pop ecx
je 0x40440b
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40440b
mov eax, dword [0x40c620]
cmp eax, dword [ebp - 8]
je 0x40440b
push eax
call fcn.0040334b
cmp eax, ebx
pop ecx
je 0x40440b
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40c618]
call fcn.0040334b
cmp eax, ebx
pop ecx
je 0x40442b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40442d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10004770
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
nop
inc eax
mov eax, ebx
mov eax, 0xd056d049
mov eax, ecx
cmp eax, 0x53
mov eax, ebx
cmp eax, 0x42
cmp eax, 0xbe2f2d44
mov eax, 0xf986f6ad
mov eax, 0x8faa8784
mov eax, 0xdc0e948b
mov eax, ecx
inc eax
push 3
push 2
push 1
call fcn.1000c200
add esp, 0xc
nop
inc eax
mov eax, ebx
nop
mov eax, ecx
mov eax, ecx
cmp eax, 0x15a41574
mov eax, ebx
mov eax, 0x7789c2f0
mov eax, ecx
mov eax, ecx
inc eax
inc eax
nop
cmp eax, 0x921e2e5a
cmp eax, 0x9cb38e7c
cmp eax, 5
inc eax
push 3
push 2
push 1
call fcn.1000c200
add esp, 0xc
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, ebx
mov eax, 0x58290c5d
nop
cmp eax, 0xed27505
cmp eax, 0xffffffb3
mov eax, 0x108f5691
inc eax
mov eax, ebx
cmp eax, 0xbfa86bfd
nop
mov eax, 0x2eb5a30a
mov eax, ebx
mov eax, ebx
nop
inc eax
nop
push 3
push 2
push 1
call fcn.1000c200
add esp, 0xc
push 0x1002beb4
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc eax
mov eax, 0xe26185e4
cmp eax, 0xfffffff8
inc eax
cmp eax, 0x4944cd23
mov eax, ecx
mov eax, 0x95afd5d5
mov eax, ecx
inc eax
cmp eax, 0xfffffff0
inc eax
mov eax, ecx
cmp eax, 0x7a
inc eax
inc eax
cmp eax, 0x8e78e11
inc eax
push 3
push 2
push 1
call fcn.1000c200
add esp, 0xc
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x1003e22c], eax
cmp eax, 0x357e4d5a
inc eax
mov eax, 0xc834a2ea
inc eax
cmp eax, 0xffffff84
mov eax, 0x23a400b9
cmp eax, 0x73fb2d55
mov eax, ecx
mov eax, ebx
inc eax
mov eax, ecx
cmp eax, 0xd149f959
mov eax, ecx
nop
inc eax
inc eax
push 3
push 2
push 1
call fcn.1000c200
add esp, 0xc
cmp dword [0x1003e22c], 0
jne 0x1000491f
push 0x41030
push str.DllWrap
push str.miss
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, 0x2973d1be
mov eax, 0x9591d84a
inc eax
cmp eax, 0xffffffb3
mov eax, ecx
mov eax, 0x82979bbe
inc eax
mov eax, ebx
cmp eax, 0xc
nop
cmp eax, 0xffffff9c
mov eax, 0xe514124f
cmp eax, 0x2c804bc6
inc eax
push 3
push 2
push 1
call fcn.1000c200
add esp, 0xc
cmp dword [0x1003e22c], 0
je 0x10004931
mov dword [ebp - 4], 1
jmp 0x10004938
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x10009850
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002a108
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push esi
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x38], 0
je 0x10009883
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x1000988f
mov al, 1
jmp 0x10009a32
mov dword [ebp - 0x2c], 8
call fcn.1000c380
push eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 0x20], eax
call fcn.1000c380
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x24]
push edx
call fcn.1000c410
add esp, 8
movzx eax, al
test eax, eax
je 0x100098d2
xor al, al
jmp 0x10009a32
push 0
push 8
lea ecx, [ebp - 0x54]
call fcn.10006860
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x54]
call fcn.1000ba00
mov ecx, eax
call fcn.10008470
mov esi, eax
lea ecx, [ebp - 0x54]
call fcn.1000f980
add esi, eax
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x54]
call fcn.1000ba00
mov ecx, eax
call fcn.10008470
push eax
mov ecx, dword [ebp - 0x14]
add ecx, 0x40
push ecx
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x38]
call fcn.10010220
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x1000994d
cmp dword [ebp - 0x1c], 1
je 0x10009954
cmp dword [ebp - 0x1c], 3
je 0x100099ee
jmp 0x10009a06
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x3d], 0
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x54]
call fcn.1000ba00
mov ecx, eax
call fcn.10008470
mov edx, dword [ebp - 0x28]
sub edx, eax
mov dword [ebp - 0x18], edx
je 0x100099b7
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 1
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x54]
call fcn.1000ba00
mov ecx, eax
call fcn.10008470
push eax
call fcn.1001858c
add esp, 0x10
cmp dword [ebp - 0x18], eax
je 0x100099b7
mov byte [ebp - 0xd], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.10007a40
mov al, byte [ebp - 0xd]
jmp 0x10009a32
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x100099da
mov byte [ebp - 0xe], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.10007a40
mov al, byte [ebp - 0xe]
jmp 0x10009a32
cmp dword [ebp - 0x18], 0
jne 0x100099ec
push 0
push 8
lea ecx, [ebp - 0x54]
call fcn.1000b370
jmp 0x10009a1e
mov byte [ebp - 0xf], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.10007a40
mov al, byte [ebp - 0xf]
jmp 0x10009a32
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.10007a40
mov al, byte [ebp - 0x10]
jmp 0x10009a32
jmp 0x100098e5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x1001e77b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1001e5f1
Function at 0x401000
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x42c0e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x110
lea eax, [ebp - 0x114]
xor bl, bl
push 0
push eax
call fcn.00406e80
add esp, 0xc
mov dword [ebp - 0x118], 0x114
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40106c
cmp dword [ebp - 0x114], 6
ja 0x40105b
jne 0x40106c
cmp dword [ebp - 0x110], 0
jbe 0x40106c
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406096
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00406096
mov esp, ebp
pop ebp
ret
Function at 0x4018d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersionServerServerLevels
xor esi, esi
mov dword [ebp - 0xc], 0
push 0x80000002
mov dword [ebp - 0x10], 4
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x401942
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push esi
push str.NanoServer
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401939
cmp dword [ebp - 8], 4
jne 0x401939
mov eax, 1
cmp dword [ebp - 0xc], eax
cmove esi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4019b0
Capabilities:
Encrypt data using aes via winapi
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push str.Derive_session_key_n
call fcn.00401950
mov edi, dword [ebp + 0xc]
push edi
call fcn.00401ba0
add esp, 8
test eax, eax
je 0x401a65
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
add ebx, 0x13
push ebx
call fcn.00409486
push dword [esi]
mov dword [ebp - 8], eax
push dword [esi + 8]
push eax
call fcn.00406fe0
mov ecx, dword [esi]
add esp, 0x10
mov esi, dword [ebp - 8]
movups xmm0, xmmword [str.Sysinternals_Rocks]
movups xmmword [ecx + esi], xmm0
mov ax, word [0x423700]
mov word [ecx + esi + 0x10], ax
mov al, byte [0x423702]
mov byte [ecx + esi + 0x12], al
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x8004
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x401a65
push 0
push ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x401a65
push dword [ebp + 0x10]
push 0
push dword [ebp - 4]
push 0x6610
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
pop edi
test eax, eax
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401ba0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi], 0
jne 0x401c41
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push 0
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x401c41
push 0x4234b0
push 0x42353c
call fcn.00401950
add esp, 8
push 8
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x401c41
push str.Fail_to_create_key_container._Try_machine_key_container.
push 0x42353c
call fcn.00401950
add esp, 8
push 0x20
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x401c41
push str.Machine_key_container_with_default_name_does_not_exist._Try_create_one.
push 0x42353c
call fcn.00401950
add esp, 8
push 0x28
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x401c41
push str.Failed_to_create_machine_key_container.
push 0x42353c
call fcn.00401950
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
ret
pop edi
mov eax, 1
pop esi
pop ebp
ret

Function at 0x401c50
Capabilities:
Encrypt or decrypt via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ebp + 0x18]
lea eax, [ebp - 4]
push 0
push esi
push 4
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401c92
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err:__x_n
call fcn.00401950
add esp, 8
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 0
push ebx
push edi
jne 0x401ca9
mov ecx, dword [ebp - 4]
mov edi, ecx
mov eax, dword [ebp + 0x10]
mov edx, edi
mov dword [ebp - 8], eax
jmp 0x401cc3
push dword [ebp - 4]
call fcn.00409486
mov ecx, dword [ebp - 4]
mov ebx, eax
add esp, 4
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov edi, ecx
mov edx, ecx
test edx, edx
je 0x401d11
push 0
push esi
push edi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test ebx, ebx
je 0x401cec
mov eax, dword [ebp - 8]
add eax, dword [esi]
mov dword [ebp - 8], eax
sub edi, dword [esi]
jne 0x401cc7
mov ecx, dword [ebp - 4]
jmp 0x401d14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err:__x_n
call fcn.00401950
push dword [ebp - 0xc]
call fcn.0040946b
add esp, 0xc
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov dword [esi], ecx
test eax, eax
je 0x401d73
mov edi, dword [ebp - 0xc]
push esi
push edi
push 0
push 1
push 0
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebx, eax
test ebx, ebx
je 0x401d56
push dword [esi]
push edi
push dword [ebp + 0x10]
call fcn.00406fe0
add esp, 0xc
push edi
call fcn.0040946b
add esp, 4
mov eax, ebx
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err2:__x_n
call fcn.00401950
add esp, 8
push edi
call fcn.0040946b
add esp, 4
pop edi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x401d80
Capabilities:
Encrypt or decrypt via wincrypt
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 8], 1
push ebx
test edi, edi
jne 0x401dbd
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401e7e
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
jmp 0x401e2c
mov eax, dword [ebp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 0
push 0
push 1
push 0
push dword [edi]
call esi
push dword [ebp + 8]
call fcn.00409486
push dword [ebp + 8]
mov ebx, eax
push dword [ebp + 0x10]
push ebx
call fcn.00406fe0
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 4]
add esp, 0x10
mov dword [ebp - 4], ecx
push dword [ebp + 8]
push eax
push ebx
push 0
push 1
push 0
push dword [edi]
call esi
test eax, eax
je 0x401e75
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401e75
mov esi, dword [ebp + 8]
mov edi, ebx
test esi, esi
je 0x401e5a
push 0
lea eax, [ebp - 4]
push eax
mov eax, 0xffff
cmp esi, eax
cmovb eax, esi
push eax
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 8], eax
test eax, eax
je 0x401e71
add edi, dword [ebp - 4]
sub esi, dword [ebp - 4]
jne 0x401e30
test ebx, ebx
je 0x401e67
push ebx
call fcn.0040946b
add esp, 4
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x401e7e
push ebx
call fcn.0040946b
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403880
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, dword [ebp + 0xc]
push esi
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
call fcn.00401ba0
add esp, 4
test eax, eax
je 0x4039a5
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push 1
push 0
push dword [esi]
call fcn.00401aa0
add esp, 0x18
test eax, eax
je 0x4039a5
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x10]
push edi
mov edi, dword [ebp + 8]
push 0
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push edi
call ebx
test eax, eax
je 0x403993
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push dword [ebp - 4]
push edi
call ebx
test eax, eax
je 0x403993
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x10]
push 0
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push edi
call ebx
test eax, eax
je 0x403993
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.0040f121
add esp, 8
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x10]
push 0
push ecx
push dword [ebp - 0xc]
push eax
push edi
call ebx
test eax, eax
je 0x403959
push dword [ebp + 0x10]
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 8]
push dword [esi]
call fcn.00401b20
add esp, 0x14
test eax, eax
jne 0x403976
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [ebp - 4]
call fcn.0040946b
add esp, 4
xor al, al
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call fcn.0040946b
add esp, 4
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
pop ebx
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
pop ebx
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x404ed0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, dword [ebp + 0xc]
mov edi, eax
push edi
push dword [ebp + 0x24]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
call fcn.004039b0
add esp, 0x28
mov esi, eax
cmp dword [ebx + 0x20828], 0
jne 0x404f5d
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x404f46
push 0xffffffffffffffff
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0
push eax
push 2
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
jne 0x404f46
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebx + 0x2082c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call ebx
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 8]
test eax, eax
je 0x404f7f
push eax
push edi
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
test edi, edi
je 0x404f86
push edi
call ebx
test esi, esi
je 0x404f8d
push esi
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x405160
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20008
call fcn.00406320
mov eax, dword [0x42c0e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x10004]
push esi
mov esi, dword [ebp + 8]
push 0x8000
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x8000
ja 0x405211
test eax, eax
je 0x405211
lea eax, [ebp - 0x20008]
push eax
lea eax, [ebp - 0x20004]
push eax
push 0x8000
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, 0x8000
ja 0x405211
test eax, eax
je 0x405211
mov ax, word [ebp - 0x10004]
lea ecx, [ebp - 0x20004]
test ax, ax
je 0x4051f4
movzx edx, ax
lea esi, [ebp - 0x10004]
mov eax, ecx
sub esi, eax
mov ax, word [ecx]
add ecx, 2
cmp dx, ax
jne 0x405211
movzx edx, word [esi + ecx]
test dx, dx
jne 0x4051e0
add ecx, 2
xor eax, eax
cmp ecx, dword [ebp - 0x20008]
pop esi
sete al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406096
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.00406096
mov esp, ebp
pop ebp
ret