joyce8/EMBER2024-capa huggingface dataset:
Function at 0x416c90
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x421d89
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov al, byte [esp + 0x24]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0xc], ecx
push edi
mov byte [esp + 0x14], al
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x416d08
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], bl
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x14]
push ecx
mov dword [esp + 0x30], ebx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x48], esp
push edx
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [esp + 0x24]
call fcn.00416d70
mov ecx, dword [esp + 0x18]
mov bl, al
test ecx, ecx
je 0x416d54
mov al, byte [ecx - 1]
test al, al
je 0x416d4a
cmp al, 0xff
je 0x416d4a
dec al
mov byte [ecx - 1], al
jmp 0x416d54
dec ecx
push ecx
call fcn.00420122
add esp, 4
mov ecx, dword [esp + 0x24]
pop edi
pop esi
mov al, bl
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 8

Function at 0x416d70
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
mov dword [esp + 8], 4
je 0x416d8a
mov eax, esi
mov edi, dword [esp + 0x20]
lea edx, [esp + 8]
push edx
push edi
push 0
push 0
push eax
mov eax, dword [ecx + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x416ddb
test esi, esi
mov dword [edi], 0
je 0x416dd3
mov al, byte [esi - 1]
test al, al
je 0x416dc9
cmp al, 0xff
je 0x416dc9
dec al
pop edi
mov byte [esi - 1], al
xor al, al
pop esi
pop ecx
ret 0x14
dec esi
push esi
call fcn.00420122
add esp, 4
pop edi
xor al, al
pop esi
pop ecx
ret 0x14
test esi, esi
je 0x416e01
mov al, byte [esi - 1]
test al, al
je 0x416df7
cmp al, 0xff
je 0x416df7
dec al
pop edi
mov byte [esi - 1], al
mov al, 1
pop esi
pop ecx
ret 0x14
dec esi
push esi
call fcn.00420122
add esp, 4
pop edi
mov al, 1
pop esi
pop ecx
ret 0x14
Function at 0x416f90
Capabilities:
Set registry value

Disassembly:
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push esi
push edi
mov edi, dword [esp + 0x20]
test edi, edi
mov edx, eax
je 0x416fa3
mov edx, edi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x416fad
mov eax, esi
push ebx
mov ebx, dword [esp + 0x28]
push ebx
push edx
push 1
push 0
push eax
mov eax, dword [ecx + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
pop ebx
je 0x417014
test esi, esi
je 0x416fe8
mov al, byte [esi - 1]
test al, al
je 0x416fde
cmp al, 0xff
je 0x416fde
dec al
mov byte [esi - 1], al
jmp 0x416fe8
dec esi
push esi
call fcn.00420122
add esp, 4
test edi, edi
je 0x41700d
mov al, byte [edi - 1]
test al, al
je 0x417003
cmp al, 0xff
je 0x417003
dec al
mov byte [edi - 1], al
pop edi
xor al, al
pop esi
ret 0x20
dec edi
push edi
call fcn.00420122
add esp, 4
pop edi
xor al, al
pop esi
ret 0x20
test esi, esi
je 0x417034
mov al, byte [esi - 1]
test al, al
je 0x41702a
cmp al, 0xff
je 0x41702a
dec al
mov byte [esi - 1], al
jmp 0x417034
dec esi
push esi
call fcn.00420122
add esp, 4
test edi, edi
je 0x417059
mov al, byte [edi - 1]
test al, al
je 0x41704f
cmp al, 0xff
je 0x41704f
dec al
mov byte [edi - 1], al
pop edi
mov al, 1
pop esi
ret 0x20
dec edi
push edi
call fcn.00420122
add esp, 4
pop edi
mov al, 1
pop esi
ret 0x20

Function at 0x417060
Capabilities:
Delete registry value

Disassembly:
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push esi
mov esi, dword [esp + 0xc]
test esi, esi
je 0x417070
mov eax, esi
push eax
mov eax, dword [ecx + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x4170a9
test esi, esi
je 0x4170a3
mov al, byte [esi - 1]
test al, al
je 0x417099
cmp al, 0xff
je 0x417099
dec al
mov byte [esi - 1], al
xor al, al
pop esi
ret 0x10
dec esi
push esi
call fcn.00420122
add esp, 4
xor al, al
pop esi
ret 0x10
test esi, esi
je 0x4170cd
mov al, byte [esi - 1]
test al, al
je 0x4170c3
cmp al, 0xff
je 0x4170c3
dec al
mov byte [esi - 1], al
mov al, 1
pop esi
ret 0x10
dec esi
push esi
call fcn.00420122
add esp, 4
mov al, 1
pop esi
ret 0x10
Function at 0x418800
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor bl, bl
xor esi, esi
mov dword [esp + 0x18], edi
mov eax, dword [edi + 0x218]
mov byte [esp + 0x14], bl
test eax, eax
mov byte [esp + 0x10], bl
je 0x418981
mov eax, dword [eax + 0x228]
test eax, eax
je 0x418981
mov ebp, dword [esp + 0x24]
lea edx, [esp + 0x1c]
mov ecx, dword [eax]
push edx
mov edx, dword [esp + 0x30]
push edx
lea edx, [esp + 0x2c]
push edx
push ebp
push esi
push eax
call dword [ecx + 0x14]
test eax, eax
jl 0x418971
mov eax, dword [edi + 0x218]
mov edx, dword [eax + 0x278]
test edx, edx
jle 0x41889a
lea ecx, [eax + 0x3ec]
add eax, 0x3fc
mov edi, edx
cmp ebp, dword [eax - 0x180]
jne 0x41888f
cmp byte [ecx], 0
mov ebx, dword [eax]
setne dl
shr ebx, 0x10
mov byte [esp + 0x10], dl
and bl, 1
add eax, 4
inc ecx
dec edi
jne 0x418875
mov byte [esp + 0x14], bl
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
and eax, 0xff
and edi, 0xff
push eax
push edi
push ecx
push esi
push edx
push ebp
push str.SetDeviceType:_port0x_04x_curdev_d_newdev_d_flag_d_isslave_d_slavable_d
push 1
call fcn.00407010
mov eax, dword [esp + 0x44]
add esp, 0x20
cmp eax, esi
jne 0x41890b
test bl, bl
je 0x4188ea
mov edx, dword [esp + 0x2c]
xor eax, eax
cmp edx, 1
sete al
xor eax, edi
jne 0x41890b
push esi
mov edi, 1
push ebp
push str.Port_0x_04x_already_type_0x_04x_n
push edi
call fcn.00407010
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x218]
mov eax, dword [edx + 0x228]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x30]
mov ecx, dword [eax]
push edx
push esi
push ebp
push 0
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x418954
push esi
mov edi, 1
push ebp
push str.Reconfigured_Port_0x_04x_to_type_0x_04x_n
push edi
call fcn.00407010
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
push esi
push ebp
push str.Failed_to_reconfigure_Port_0x_04x_to_type_0x_04x_n
push 1
call fcn.00407010
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
push ebp
push str.GetPortDeviceType_Port_0x_04x_failed__n
push 1
call fcn.00407010
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
Function at 0x41b640
Capabilities:
Copy file
Delete file

Disassembly:
sub esp, 0x420
push ebx
push esi
mov esi, dword [esp + 0x42c]
push edi
push esi
push str.xCParse::DeleteDir__s_______n
push 1
xor ebx, ebx
call fcn.00407010
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x3fe
jbe 0x41b693
push str.xCParse::DeleteDir__Path_is_too_long.__n
push 1
call fcn.00407010
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x420
ret 4
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0xc], ebx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
mov dword [esp + 0x14], 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ecx
mov word [esp + 0x20], 0x414
mov dword [esp + 0x22], ebx
mov dword [esp + 0x26], ebx
mov dword [esp + 0x2a], ebx
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
cmp eax, ebx
jne 0x41b717
mov ebx, 1
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x420
ret 4
push eax
push str.xCParse::DeleteDir__SHFileOperation_failed__code:__d_.__n
push 1
call fcn.00407010
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
add esp, 0x420
ret 4

Function at 0x41dc40
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push esi
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x41dc63
pop esi
add esp, 0x14
ret 4
lea ecx, [esp + 0xc]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
push eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 2
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41dcb2
xor eax, eax
pop esi
add esp, 0x14
ret 4
mov ecx, dword [esp + 0x1c]
push 1
push 0
push 0x1e
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownA]
test eax, eax
jne 0x41dcd0
pop esi
add esp, 0x14
ret 4
mov eax, dword [esp + 4]
push 0
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
push eax
mov dword [esp + 0x2c], 0
call esi
mov eax, 1
pop esi
add esp, 0x14
ret 4
Function at 0x420468
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4235d0
push 0x42057e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
push 1
call dword [sym.imp.MSVCRT.dll___set_app_type]
pop ecx
or dword [0x4314d0], 0xffffffff
or dword [0x4314d4], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x4314ac]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov ecx, dword [0x4314a8]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x4314d8], eax
call fcn.004205c9
cmp dword [0x431410], 0
jne 0x4204eb
push 0x4205c6
call dword [sym.imp.MSVCRT.dll___setusermatherr]
pop ecx
call fcn.004205ae
push 0x427010
push 0x42700c
call sub.MSVCRT.dll__initterm
mov eax, dword [0x4314a4]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x4314a0]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll___getmainargs]
push 0x427008
push section..data
call sub.MSVCRT.dll__initterm
call dword [sym.imp.MSVCRT.dll___p___initenv]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
call fcn.00407530
add esp, 0x30
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
push eax
push ecx
call sub.MSVCRT.dll__XcptFilter
pop ecx
pop ecx
ret
Function at 0x405ef4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422a34], 0
push esi
jne 0x405f2b
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 0x405f05
mov dword [ecx*4 + 0x422a30], eax
inc ecx
cmp ecx, 0x100
jl 0x405f00
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f5c
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 + 0x422a30]
xor eax, esi
inc ecx
dec edx
jne 0x405f3e
pop edi
not eax
pop esi
ret 0xc

Function at 0x892830
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.00892980
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x892856
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x892842
add dl, dl
jne 0x892861
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x8928b4
xor eax, eax
add dl, dl
jne 0x89286e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x892955
add dl, dl
jne 0x89287d
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x892888
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x892893
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x89289e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x8928aa
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x89284d
mov eax, 1
add dl, dl
jne 0x8928c2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x8928cd
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8928b9
sub eax, ebx
mov ebx, 1
jne 0x892900
mov ecx, 1
add dl, dl
jne 0x8928e6
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x8928f1
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8928dd
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x89284d
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x892917
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x892922
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x89290e
cmp eax, 0x7d00
jae 0x892945
cmp eax, 0x500
jb 0x892940
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x89284d
cmp eax, 0x7f
ja 0x892948
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x89284d
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x892976
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x89284d
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x100018a4
Capabilities:
Create tcp socket
Create udp socket
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov edi, ecx
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
push str.socket
push ebx
call esi
push str.WSAIoctl
push ebx
call esi
push str.htons
push ebx
mov dword [ebp - 0x18], eax
call esi
push str.setsockopt
push ebx
mov dword [ebp - 0xc], eax
call esi
push str.gethostbyname
push ebx
mov dword [ebp - 0x14], eax
call esi
push str.connect
push ebx
mov dword [ebp - 8], eax
call esi
mov ecx, edi
mov dword [ebp - 0x10], eax
call fcn.10001d24
push dword [edi + 0xac]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
and byte [edi + 0xb8], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [edi + 0xa8], eax
je 0x1000196c
push dword [ebp + 8]
call dword [ebp - 8]
mov esi, eax
test esi, esi
je 0x1000196c
push dword [ebp + 0xc]
mov word [ebp - 0x34], 2
call dword [ebp - 0xc]
mov word [ebp - 0x32], ax
mov eax, dword [esi + 0xc]
push 0x10
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push eax
push dword [edi + 0xa8]
call dword [ebp - 0x10]
cmp eax, 0xffffffff
jne 0x10001973
xor al, al
jmp 0x100019f4
push 1
lea eax, [ebp - 1]
pop esi
mov byte [ebp - 1], 1
push esi
push eax
push 8
push 0xffff
push dword [edi + 0xa8]
call dword [ebp - 0x14]
test eax, eax
jne 0x100019c4
mov dword [ebp - 0x24], esi
xor esi, esi
push esi
lea eax, [ebp - 1]
push esi
push eax
push esi
push esi
lea eax, [ebp - 0x24]
push 0xc
push eax
push 0x98000004
push dword [edi + 0xa8]
mov dword [ebp - 0x20], 0x2bf20
mov dword [ebp - 0x1c], 0x2710
call dword [ebp - 0x18]
jmp 0x100019c6
xor esi, esi
push 1
push esi
push esi
push edi
push 0x100019fb
push esi
push esi
mov byte [edi + 0xb8], 1
call fcn.100097ed
add esp, 0x1c
cmp ebx, esi
mov dword [edi + 0xa4], eax
je 0x100019f2
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x100021e3
Capabilities:
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10014270
push 0x1000c7c4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
call sub.MSVCRT.dll_malloc
pop ecx
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, ebx
je 0x10002341
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, edi
mov dword [ebp - 0x1c], esi
cmp word [edi], 0x5c
jne 0x1000229a
lea eax, [edi + 2]
cmp word [eax], 0x5c
jne 0x1000229a
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
inc esi
mov dword [ebp - 0x1c], esi
mov ax, word [esi]
cmp ax, bx
je 0x10002270
cmp ax, 0x5c
je 0x10002270
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
jmp 0x10002254
cmp word [esi], bx
je 0x1000227a
inc esi
inc esi
mov dword [ebp - 0x1c], esi
mov ax, word [esi]
cmp ax, bx
je 0x10002293
cmp ax, 0x5c
je 0x10002293
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
jmp 0x10002277
cmp word [esi], bx
je 0x100022c0
jmp 0x100022bb
lea eax, [edi + 2]
cmp word [eax], 0x3a
jne 0x100022c0
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
inc esi
mov dword [ebp - 0x1c], esi
mov ax, word [esi]
cmp ax, bx
je 0x100022c0
cmp ax, 0x5c
jne 0x100022c0
inc esi
inc esi
mov dword [ebp - 0x1c], esi
or ebx, 0xffffffff
mov ax, word [esi]
test ax, ax
je 0x10002323
cmp ax, 0x5c
jne 0x10002315
and word [esi], 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x100022fd
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10002310
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jmp 0x10002302
and eax, 0x10
cmp al, 0x10
je 0x10002310
push edi
call sub.MSVCRT.dll_free
pop ecx
mov dword [ebp - 4], ebx
jmp 0x10002345
mov word [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
mov dword [ebp - 0x1c], esi
jmp 0x100022c3
mov dword [ebp - 4], ebx
push edi
call sub.MSVCRT.dll_free
pop ecx
mov al, 1
jmp 0x10002347
or dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x10002358
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
push ebx
push esi
mov ebx, 0x208
push edi
push ebx
lea eax, [ebp - 0x274]
push 0
push eax
mov dword [ebp - 8], ebx
call sub.MSVCRT.dll_memset
push 0x2e
push dword [ebp + 8]
call sub.MSVCRT.dll_wcsrchr
add esp, 0x14
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1000244d
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.RegOpenKeyW
push edi
call esi
push str.RegOpenKeyExW
push edi
call esi
push str.RegQueryValueExW
push edi
mov dword [ebp - 0x10], eax
call esi
push str.RegCloseKey
push edi
mov dword [ebp - 0x14], eax
call esi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
mov edi, 0xf003f
push eax
push edi
push 0
push dword [ebp - 0x18]
mov esi, 0x80000000
push esi
call dword [ebp - 0x10]
test eax, eax
jne 0x1000244d
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x274]
push eax
push 0
push dword [ebp - 4]
call dword [ebp - 0x14]
push dword [ebp - 4]
call dword [ebp - 0xc]
push 0x3e8
lea eax, [ebp - 0x65c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x65c]
push str._sSHELLOPENCOMMAND
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 4]
push eax
push edi
xor edi, edi
lea eax, [ebp - 0x65c]
push edi
push eax
push esi
call dword [ebp - 0x10]
test eax, eax
je 0x10002454
xor al, al
jmp 0x10002515
push ebx
lea eax, [ebp - 0x274]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
mov dword [ebp - 8], ebx
push eax
lea eax, [ebp - 0x274]
push eax
push edi
push dword [ebp - 4]
call dword [ebp - 0x14]
push dword [ebp - 4]
call dword [ebp - 0xc]
lea eax, [ebp - 0x274]
push 0x1001a2a4
push eax
call sub.MSVCRT.dll_wcsstr
pop ecx
cmp eax, edi
pop ecx
jne 0x100024d0
lea eax, [ebp - 0x274]
push 0x1001a29c
push eax
call sub.MSVCRT.dll_wcsstr
pop ecx
cmp eax, edi
pop ecx
jne 0x100024d0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x274]
push 0x1001a298
push eax
call esi
push dword [ebp + 8]
lea eax, [ebp - 0x274]
push eax
call esi
jmp 0x100024da
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x10
xor eax, eax
cmp dword [ebp + 0xc], eax
pop ecx
lea edi, [ebp - 0x68]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x6c], 0x44
je 0x100024f7
mov dword [ebp - 0x64], str.WinSta0Default
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x6c]
push ecx
push eax
push eax
push eax
push eax
push eax
lea ecx, [ebp - 0x274]
push eax
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 8