joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40365b
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x413aeb
call fcn.00413410
sub esp, 0x14
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
lea eax, [ebp - 0x14]
push 1
push eax
xor ebx, ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
call esi
push 3
lea ecx, [ebp - 0x20]
mov edi, eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.004017b4
lea eax, [edi + 2]
mov dword [ebp - 4], 1
cmp eax, dword [ebp - 0x18]
jl 0x4036ae
push eax
lea ecx, [ebp - 0x20]
call fcn.004017b4
lea eax, [edi + 2]
cmp eax, dword [ebp - 0x18]
jl 0x4036bf
push eax
lea ecx, [ebp - 0x20]
call fcn.004017b4
inc edi
push edi
push dword [ebp - 0x20]
push dword [ebp + 0xc]
call esi
mov ecx, dword [ebp - 0x20]
xor eax, eax
cmp word [ecx], bx
je 0x4036dd
mov edx, ecx
inc eax
inc edx
inc edx
cmp word [edx], bx
jne 0x4036d5
mov word [ecx + eax*2], bx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
call fcn.004015ee
mov dword [ebp - 0x10], 1
push dword [ebp - 0x20]
mov byte [ebp - 4], bl
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x403b9e
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x419168]
push edi
xor edi, edi
test eax, eax
je 0x403bc2
mov ecx, 0x419168
cmp eax, dword [ebp + 8]
je 0x403bc2
mov eax, dword [ecx + 0x10]
add ecx, 0x10
inc edi
test eax, eax
jne 0x403bb2
shl edi, 4
mov eax, dword [edi + 0x419174]
test eax, eax
jne 0x403c86
cmp dword [0x41939c], 0xffffffff
jne 0x403be7
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [0x41939c], eax
cmp word [0x419398], 0xffff
jne 0x403bfe
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov word [0x419398], ax
mov ax, word [0x4193a0]
cmp ax, 0xffff
jne 0x403c15
call fcn.0040305e
mov word [0x4193a0], ax
mov ecx, dword [edi + 0x419170]
and dword [ebp + 8], 0
push ebx
mov ebx, dword [edi + 0x41916c]
test ecx, ecx
push esi
je 0x403c51
mov edx, 0x804
cmp dword [0x41939c], edx
je 0x403c46
cmp word [0x419398], dx
je 0x403c46
cmp ax, dx
jne 0x403c51
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [ebp + 8], eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi + 4]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [edi + 0x419174], eax
lea ecx, [esi + 1]
push ecx
push eax
push esi
push ebx
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [edi + 0x419174]
pop esi
pop ebx
pop edi
pop ebp
ret
Function at 0x403e78
Capabilities:
Get common file path

Disassembly:
mov eax, 0x413b24
call fcn.00413410
sub esp, 0x2a4
push ebx
push esi
push edi
push 3
call fcn.00403b9e
push 2
mov dword [0x41a440], eax
call fcn.00403b9e
push 5
mov dword [0x41a43c], eax
call fcn.00403b9e
push 0x15
mov dword [0x41a438], eax
call fcn.00403b9e
push 0x16
mov dword [0x41a434], eax
call fcn.00403b9e
push 0x17
mov dword [0x41a430], eax
call fcn.00403b9e
xor edi, edi
add esp, 0x18
mov dword [0x41a42c], eax
mov dword [0x41a424], edi
mov dword [0x41a428], edi
xor ebx, ebx
mov esi, 0x41a3b0
push edi
lea eax, [ebp - 0x2b0]
push ebx
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x403fa5
push ebx
lea eax, [ebp - 0xa4]
push str.7zSfxFolder_02d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x24]
call fcn.00403fbe
lea eax, [ebp - 0xa4]
lea ecx, [ebp - 0x24]
push eax
mov dword [ebp - 4], edi
call fcn.00401628
lea eax, [ebp - 0x2b0]
lea ecx, [ebp - 0x18]
push eax
call fcn.00401628
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
call fcn.0040388f
mov edi, 0x419a84
cmp dword [edi - 4], ebx
jne 0x403f7b
push dword [edi]
lea ecx, [ebp - 0x24]
call fcn.00401628
lea eax, [ebp - 0x2b0]
lea ecx, [ebp - 0x18]
push eax
call fcn.00401628
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
call fcn.0040388f
add edi, 8
cmp edi, 0x419aac
jl 0x403f52
push dword [ebp - 0x18]
mov dword [ebp - 4], 1
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x24]
or dword [ebp - 4], 0xffffffff
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
xor edi, edi
pop ecx
inc ebx
cmp ebx, 0x40
jl 0x403eeb
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x404006
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov eax, 0x413b63
call fcn.00413410
sub esp, 0x14
push ebx
push esi
push edi
xor ebx, ebx
push 3
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.004017b4
cmp dword [ebp - 0x18], 2
push 1
pop esi
mov dword [ebp - 4], esi
jg 0x404044
push 2
lea ecx, [ebp - 0x20]
call fcn.004017b4
push dword [ebp - 0x20]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
call esi
mov ecx, dword [ebp - 0x20]
mov word [ecx], bx
xor ecx, ecx
cmp eax, ebx
mov dword [ebp - 0x1c], ecx
jbe 0x404091
lea edi, [eax + 1]
cmp edi, dword [ebp - 0x18]
jl 0x404070
push edi
lea ecx, [ebp - 0x20]
call fcn.004017b4
push dword [ebp - 0x20]
push edi
call esi
mov eax, dword [ebp - 0x20]
xor ecx, ecx
cmp word [eax], bx
je 0x40408a
mov edx, eax
inc ecx
inc edx
inc edx
cmp word [edx], bx
jne 0x404082
mov word [eax + ecx*2], bx
mov dword [ebp - 0x1c], ecx
lea eax, [ecx + 0xf]
xor edi, edi
mov dword [ebp - 0x10], eax
lea esi, [ecx + ecx]
jmp 0x4040a1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jl 0x4040af
push eax
lea ecx, [ebp - 0x20]
call fcn.004017b4
mov eax, dword [ebp - 0x20]
push edi
push dword [ebp + 0xc]
add eax, esi
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [ebp - 0x20]
add esp, 0xc
xor eax, eax
cmp word [ecx], bx
je 0x4040d6
mov edx, ecx
inc eax
inc edx
inc edx
cmp word [edx], bx
jne 0x4040ce
mov word [ecx + eax*2], bx
push dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4040f4
inc edi
cmp edi, 0xfff
jl 0x40409e
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x20]
push eax
call fcn.004015ee
mov dword [ebp - 0x14], 1
push dword [ebp - 0x20]
mov byte [ebp - 4], bl
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x404166
Capabilities:
Set environment variable

Disassembly:
mov eax, 0x413b78
call fcn.00413410
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41a3b8], esi
jle 0x4041ca
mov eax, dword [0x41a3bc]
lea ecx, [ebp - 0x18]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
call fcn.004015ee
and dword [ebp - 4], 0
lea eax, [ebp - 0x18]
push eax
call fcn.0040414b
mov eax, dword [0x41a3bc]
pop ecx
push dword [ebp - 0x18]
mov eax, dword [eax + esi*4]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
inc esi
pop ecx
cmp esi, dword [0x41a3b8]
jl 0x40417e
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x4078e5
Capabilities:
Get common file path
Get file system object information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4d0
push esi
push edi
lea eax, [ebp - 0x10]
mov edi, 0x4b6
push eax
mov esi, ecx
push edi
call fcn.0040719f
mov eax, dword [ebp - 4]
push 1
sub eax, dword [ebp - 0xc]
push edi
mov ecx, esi
inc eax
inc eax
mov dword [esi + 0x44], eax
call fcn.00407257
inc edi
push 1
push edi
mov ecx, esi
call fcn.00407257
lea eax, [ebp - 0x21c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x103
lea eax, [ebp - 0x4d0]
push 0x2b4
push eax
lea eax, [ebp - 0x21c]
push 0
push eax
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
mov eax, dword [ebp - 0x4d0]
push edi
push dword [esi + 4]
mov dword [esi + 0x3c], eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0x407a8b
push 0xfffffffffffffffc
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
mov ecx, esi
mov dword [esi + 0x40], eax
call fcn.00406f1d
mov ecx, esi
mov edi, eax
call fcn.00407b65
mov eax, edi
pop edi
pop esi
leave
ret

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

Disassembly:
push esi
push edi
xor edx, edx
mov ecx, 0x41a5a0
push 8
mov eax, edx
pop esi
mov edi, eax
and edi, 1
dec edi
not edi
and edi, 0xedb88320
shr eax, 1
xor eax, edi
dec esi
jne 0x408c06
mov dword [ecx], eax
add ecx, 4
inc edx
cmp ecx, 0x41a9a0
jl 0x408c01
pop edi
pop esi
ret

Function at 0x408c2c
Capabilities:
Encode data using xor

Disassembly:
mov eax, ecx
mov ecx, edx
mov edx, dword [esp + 4]
test edx, edx
jbe 0x408c59
push esi
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x41a5a0]
xor eax, esi
inc ecx
dec edx
jne 0x408c3a
pop edi
pop esi
ret 4
Function at 0x40af39
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get number of processors

Disassembly:
mov eax, 0x4143a8
call fcn.00413410
push ecx
push ecx
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x10], esi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], 8
mov dword [esi], 0x415620
mov dword [ebp - 4], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], 1
mov dword [esi + 0x14], 0x4156d8
push 4
mov ebx, 0x415630
pop eax
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], eax
mov dword [esi + 0x28], ebx
lea ecx, [esi + 0x3c]
push eax
mov byte [ebp - 4], 2
call fcn.00409649
mov dword [esi + 0x3c], 0x415770
push 4
mov dword [esi + 0x54], edi
pop eax
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], eax
mov dword [esi + 0x50], ebx
lea edi, [esi + 0x64]
push eax
mov ecx, edi
mov byte [ebp - 4], al
call fcn.00409649
mov dword [edi], 0x415768
lea edi, [esi + 0x78]
mov byte [ebp - 4], 5
mov ecx, edi
mov dword [ebp - 0x14], edi
call fcn.00409aef
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 6
call fcn.0040a844
lea edi, [esi + 0xa0]
mov byte [ebp - 4], 7
mov ecx, edi
mov dword [ebp - 0x14], edi
call fcn.00409aef
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 8
call fcn.0040a844
lea edi, [esi + 0xc8]
mov byte [ebp - 4], 9
mov ecx, edi
mov dword [ebp - 0x14], edi
call fcn.00409aef
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 0xa
call fcn.0040a844
mov byte [ebp - 4], 0xb
lea edi, [esi + 0xf0]
mov ecx, edi
mov dword [ebp - 0x14], edi
call fcn.00409aef
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 0xc
call fcn.0040a844
lea ecx, [esi + 0x118]
mov byte [ebp - 4], 0xd
call fcn.0040a844
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40e1f8
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x4148ef
call fcn.00413410
push ecx
push ebx
push esi
mov esi, ecx
xor eax, eax
push edi
mov dword [ebp - 0x10], esi
mov dword [esi], eax
mov dword [ebp - 4], eax
mov dword [esi + 4], eax
mov ecx, dword [ebp + 8]
push 8
mov dword [esi + 8], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0xc], ecx
lea ecx, [esi + 0x10]
pop edi
mov edx, 0x415620
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], edi
mov dword [ecx], edx
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edi
mov dword [esi + 0x24], edx
lea ebx, [esi + 0x38]
mov edx, 0x415648
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 4
mov dword [ebx], edx
lea edi, [esi + 0x4c]
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 4
mov dword [edi], edx
push dword [esi + 8]
mov byte [ebp - 4], 5
call fcn.0040ff33
push dword [esi + 8]
mov ecx, ebx
call fcn.0040ff33
push dword [esi + 0xc]
mov ecx, edi
call fcn.0040ff33
push dword [esi + 0xc]
mov ecx, edi
call fcn.0040ff33
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8

Function at 0x40e204
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x4148ef
call fcn.00413410
push ecx
push ebx
push esi
mov esi, ecx
xor eax, eax
push edi
mov dword [ebp - 0x10], esi
mov dword [esi], eax
mov dword [ebp - 4], eax
mov dword [esi + 4], eax
mov ecx, dword [ebp + 8]
push 8
mov dword [esi + 8], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0xc], ecx
lea ecx, [esi + 0x10]
pop edi
mov edx, 0x415620
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], edi
mov dword [ecx], edx
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edi
mov dword [esi + 0x24], edx
lea ebx, [esi + 0x38]
mov edx, 0x415648
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 4
mov dword [ebx], edx
lea edi, [esi + 0x4c]
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 4
mov dword [edi], edx
push dword [esi + 8]
mov byte [ebp - 4], 5
call fcn.0040ff33
push dword [esi + 8]
mov ecx, ebx
call fcn.0040ff33
push dword [esi + 0xc]
mov ecx, edi
call fcn.0040ff33
push dword [esi + 0xc]
mov ecx, edi
call fcn.0040ff33
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8

Function at 0x40f011
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push esi
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f037
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40f037
xor al, al
jmp 0x40f057
push 1
push 0
push 0
push dword [ebp - 4]
call fcn.00413570
mov ecx, eax
xor eax, eax
add ecx, esi
adc edx, eax
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov al, 1
pop esi
leave
ret 4
Function at 0x410899
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0x10]
push eax
xor eax, eax
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push eax
call dword [sym.imp.MSVCRT.dll__beginthreadex]
mov ecx, dword [ebp + 8]
push eax
mov dword [ecx], eax
call fcn.0041086f
add esp, 0x1c
pop ebp
ret

Function at 0x4130db
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov ecx, dword [ebp + 0x14]
xor eax, eax
mov edx, dword [ecx]
and edx, 7
cmp dword [ebp + 0xc], 5
jae 0x4130f2
leave
ret
add dword [ebp + 0x10], 5
or dword [ebp - 4], 0xffffffff
push ebx
push esi
push edi
mov ecx, dword [ebp + 8]
lea esi, [eax + ecx]
mov eax, dword [ebp + 0xc]
lea edi, [ecx + eax - 4]
cmp esi, edi
jae 0x413119
mov al, byte [esi]
and al, 0xfe
cmp al, 0xe8
je 0x413119
inc esi
jmp 0x41310a
mov eax, esi
sub eax, ecx
cmp esi, edi
mov dword [ebp - 8], eax
jae 0x413209
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, 3
jbe 0x41314e
xor edx, edx
mov cl, byte [esi + 4]
mov dword [ebp - 4], eax
test cl, cl
je 0x41317b
cmp cl, 0xff
je 0x41317b
and edx, 3
shl edx, 1
or edx, 1
inc eax
jmp 0x4130fd
dec ecx
shl edx, cl
and edx, 7
je 0x413134
movzx ecx, byte [edx + 0x41599c]
mov edi, esi
sub edi, ecx
cmp byte [edx + 0x415994], 0
mov cl, byte [edi + 4]
je 0x413176
test cl, cl
je 0x413176
cmp cl, 0xff
jne 0x413134
mov dword [ebp - 4], eax
jmp 0x413143
xor ebx, ebx
mov bh, cl
mov bl, byte [esi + 3]
movzx ecx, byte [esi + 2]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [esi + 1]
shl ebx, 8
or ebx, ecx
mov edi, ebx
cmp dword [ebp + 0x18], 0
je 0x4131a4
lea ebx, [edi + eax]
add ebx, dword [ebp + 0x10]
jmp 0x4131ab
sub edi, eax
sub edi, dword [ebp + 0x10]
mov ebx, edi
test edx, edx
je 0x4131df
movzx edi, byte [edx + 0x41599c]
push 0x18
mov eax, ebx
shl edi, 3
pop ecx
sub ecx, edi
shr eax, cl
test al, al
je 0x4131ca
cmp al, 0xff
jne 0x4131dc
push 0x20
mov eax, dword [ebp - 8]
pop ecx
push 1
sub ecx, edi
pop edi
shl edi, cl
dec edi
xor edi, ebx
jmp 0x413196
mov eax, dword [ebp - 8]
mov ecx, ebx
mov byte [esi + 1], bl
shr ecx, 0x18
and cl, 1
dec cl
not cl
mov byte [esi + 4], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [esi + 3], cl
mov ecx, ebx
shr ecx, 8
mov byte [esi + 2], cl
add eax, 5
jmp 0x4130fd
mov esi, eax
push 3
sub esi, dword [ebp - 4]
pop edi
lea ecx, [esi - 1]
shl edx, cl
and edx, 7
cmp edi, esi
sbb ecx, ecx
pop edi
not ecx
and ecx, edx
mov edx, dword [ebp + 0x14]
pop esi
pop ebx
mov dword [edx], ecx
leave
ret
Function at 0x4049c5
Capabilities:
Query environment variable

Disassembly:
push ebx
push edi
xor eax, eax
push eax
push eax
call fcn.00426350
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.004261b0
pop edx
push eax
call fcn.0041a920
lea eax, [esp + 4]
push eax
call fcn.004261f0
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.004261b0
pop edx
push eax
push 0x1f4
call fcn.00423a90
lea eax, [esp + 8]
push eax
call fcn.004261f0
push 0x1f4
mov eax, dword [esp + 8]
push eax
mov eax, str.WINDIR
push eax
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov edx, dword [esp + 4]
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.00426280
mov edx, str.System32
push edx
call fcn.00426280
push 0x5064a8
call fcn.004261f0
mov edx, dword [esp + 4]
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.00426280
push 0x506404
call fcn.004261f0
push edx
call fcn.004261b0
pop edx
push eax
mov edx, dword [esp + 8]
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.00426280
mov edx, str.SysNativecmd.exe
push edx
call fcn.00426280
call fcn.0040c9c2
add dword [esp], edx
call fcn.0041a66e
call fcn.0040c9e0
push edx
push eax
pop ebx
pop edi
cmp edi, 0
jg 0x404ab6
jl 0x404ab2
cmp ebx, 0
ja 0x404ab6
xor eax, eax
jmp 0x404abb
mov eax, 1
or eax, eax
je 0x404ae8
mov edx, dword [esp + 4]
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.00426280
mov edx, str.SysNative
push edx
call fcn.00426280
lea eax, [esp + 8]
push eax
call fcn.004261f0
jmp 0x404b0f
mov edx, dword [esp + 4]
push edx
call fcn.004261b0
pop edx
push eax
push edx
call fcn.00426280
mov edx, str.System32
push edx
call fcn.00426280
lea eax, [esp + 8]
push eax
call fcn.004261f0
push 3
push dword [0x506404]
mov eax, str._End__TN_DefenderTools
push eax
mov eax, str.schtasks.exe
push eax
call fcn.0040d8ca
push 3
push dword [0x506404]
mov eax, str._delete__TN_DefenderTools__F
push eax
mov eax, str.schtasks.exe
push eax
call fcn.0040d8ca
call fcn.00403985
xor eax, eax
push dword [esp]
call fcn.004263b0
push dword [esp + 4]
call fcn.004263b0
add esp, 8
pop edi
pop ebx
ret
Function at 0x40b073
Capabilities:
Create process on windows

Disassembly:
push ebp
push ebx
mov edx, 0x19
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x40b07a
call fcn.00426350
mov edx, dword [esp + 0x70]
lea ecx, [esp]
call fcn.0040c000
lea eax, [esp + 4]
lea eax, [esp + 0x48]
lea ebp, [esp + 4]
mov dword [ebp], 0x44
mov dword [ebp + 0x2c], 1
mov ebx, dword [esp + 0x74]
and ebx, 2
and ebx, ebx
je 0x40b0c9
lea ebp, [esp + 4]
mov word [ebp + 0x30], 0
jmp 0x40b0d3
lea ebp, [esp + 4]
mov word [ebp + 0x30], 1
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 8]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x20]
push 0
call sub.KERNEL32.dll_CreateProcessW
mov dword [esp + 0x58], eax
cmp dword [esp + 0x58], 0
je 0x40b15b
mov ebx, dword [esp + 0x74]
and ebx, 1
and ebx, ebx
je 0x40b152
lea ebp, [esp + 0x48]
mov eax, dword [ebp + 4]
mov dword [esp + 0x5c], eax
push 1
call fcn.00418e2d
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x60]
call sub.KERNEL32.dll_GetExitCodeThread
mov ebx, dword [esp + 0x60]
cmp ebx, 0x103
je 0x40b150
jmp 0x40b152
jmp 0x40b12a
lea ebp, [esp + 0x48]
mov eax, dword [ebp]
jmp 0x40b15d
xor eax, eax
push dword [esp]
call fcn.004263b0
add esp, 0x64
pop ebx
pop ebp
ret 8

Function at 0x40d0fd
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x40d195
push edi
push 0x5081f0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x506a00]
test edi, edi
je 0x40d169
push ebx
push esi
lea ebx, [edi + 8]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40d162
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebx
push 0x506a00
call fcn.00426099
pop ecx
pop ecx
jmp 0x40d164
mov edi, dword [edi]
test edi, edi
jne 0x40d139
pop ebx
mov eax, dword [0x502f08]
mov esi, eax
inc eax
push 0x10
push 0x506a00
mov dword [0x502f08], eax
call fcn.004260d9
pop ecx
pop ecx
push 0x5081f0
mov dword [eax], ebp
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret 8

Function at 0x40d19d
Capabilities:
Resume thread

Disassembly:
push dword [esp + 4]
call fcn.0040d0b1
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
ret 4

Function at 0x40d1b0
Capabilities:
Suspend thread

Disassembly:
push dword [esp + 4]
call fcn.0040d0b1
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
ret 4
Function at 0x40d554
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x40d5a9
push dword [esp + 0x10]
push 0x40d4d3
call dword [sym.imp.USER32.dll_EnumWindows]
mov esi, dword [0x506a04]
test esi, esi
je 0x40d602
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x40d5a1
cmp byte [esi + 0x10], 0
je 0x40d5a1
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x40d57d
jmp 0x40d602
mov esi, dword [0x506a04]
test esi, esi
je 0x40d602
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x40d5fb
cmp byte [esi + 0x11], 0
je 0x40d5d7
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x40d5ee
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
push ebp
push 0x506a04
call fcn.00426099
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x40d5b6
pop ebp
pop edi
pop esi
pop ebx
ret 4

Function at 0x40d6a5
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x508218]
call fcn.0042575b
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x40d7a5
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x40d6fb
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x40d6f3
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x40d73b
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x40d77d
push 0x22
pop edx
cmp cx, dx
je 0x40d72d
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x40d71d
xor ecx, ecx
cmp word [eax], cx
je 0x40d77d
mov ecx, eax
add eax, 2
jmp 0x40d77f
test dx, dx
je 0x40d785
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x40d72d
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x40d773
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x40d77d
cmp cx, dx
je 0x40d770
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x40d760
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x40d745
jmp 0x40d72d
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x40d787
xor edx, edx
cmp dword [ebp], ebx
jne 0x40d790
test edi, edi
jne 0x40d7ad
test edx, edx
je 0x40d795
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x40d6e9
test edi, edi
jne 0x40d7be
mov eax, ebx
jmp 0x40d7c2
test esi, esi
je 0x40d7be
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x40d7c2
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret