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

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x406608
mov eax, dword [0x40a8f8]
cmp eax, 0xffffffff
je 0x4065ff
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x40a8f8], 0xffffffff
jmp 0x40667b
cmp dword [0x43ba60], ebx
je 0x40667b
cmp byte [0x43b660], bl
je 0x406647
cmp dword [0x40a8f8], 0xffffffff
jne 0x406650
push 4
push 0x40000000
push 0x43b660
call fcn.00405fab
cmp eax, 0xffffffff
mov dword [0x40a8f8], eax
je 0x40667b
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x40a8f8], 0xffffffff
je 0x40667b
push esi
mov esi, 0x43faa0
push 0x40aacc
push esi
call fcn.004062f8
lea eax, [ebp + 8]
push ebx
push eax
push esi
call fcn.004062eb
push eax
push esi
push dword [0x40a8f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
pop ebp
ret 4

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

Disassembly:
push esi
xor esi, esi
cmp dword [0x43b264], esi
push edi
jne 0x40685d
mov ecx, 0x43b260
push 8
mov eax, esi
pop edi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec edi
jne 0x406839
mov dword [ecx], eax
add ecx, 4
inc esi
cmp ecx, 0x43b660
jl 0x406834
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov edx, ecx
dec ecx
test edx, edx
not eax
jbe 0x406892
lea edx, [ecx + 1]
mov ecx, dword [esp + 0x10]
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x43b260]
xor eax, esi
inc ecx
dec edx
jne 0x406875
pop edi
pop esi
not eax
ret 0xc
Function at 0x40123b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push edi
push 0x7f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x207]
mov byte [ebp - 0x208], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 4]
push ecx
push 1
mov eax, dword [eax]
push ebx
push eax
mov dword [ebp - 4], ebx
push dword [ebp + 8]
mov dword [ebp - 8], 0x200
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401286
xor eax, eax
jmp 0x4012bc
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x208]
push eax
mov eax, dword [ebp + 0x10]
push ebx
push ebx
push dword [eax]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x208]
push eax
call fcn.00407cec
push 1
pop eax
pop edi
pop ebx
leave
ret
Function at 0x401484
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
and byte [ebp - 0x200], 0
push edi
push 0x7f
xor eax, eax
pop ecx
lea edi, [ebp - 0x1ff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x200]
push 0x200
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push dword [ebp + 8]
mov byte [ebp + eax - 0x200], 0x5c
lea eax, [ebp - 0x200]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x200]
push 0x40c200
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x10
test eax, eax
pop edi
jne 0x4014ea
leave
ret
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
push 1
pop eax
leave
ret
Function at 0x401c6f
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor edi, edi
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_SettingsZoneMapDomains
lea ecx, [ebp - 8]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
call sub.MFC42.DLL_CString::CString_1
push dword [ebp + 8]
mov eax, 0x40c38c
push eax
push dword [ebp + 0xc]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.MFC42.DLL_operator
push eax
lea eax, [ebp + 0xc]
push eax
call sub.MFC42.DLL_operator_1
push eax
lea eax, [ebp + 8]
push eax
call sub.MFC42.DLL_operator_2
push eax
lea ecx, [ebp - 8]
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0xc]
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 4]
mov esi, SysReAllocString
push eax
push 1
push edi
push dword [ebp - 8]
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401d4a
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push edi
push 0x20006
push edi
push edi
push edi
push dword [ebp - 8]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401d56
lea eax, [ebp + 8]
push 4
push eax
push 4
push edi
push str.https
push dword [ebp - 4]
mov dword [ebp + 8], 2
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
jne 0x401d56
lea ecx, [ebp - 8]
call sub.MFC42.DLL_CString::CString
push 1
pop eax
jmp 0x401d60
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
pop edi
lea ecx, [ebp - 8]
call sub.MFC42.DLL_CString::CString
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x401d64
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x454
push ebx
push esi
push edi
push 0x44
pop esi
xor ebx, ebx
push esi
lea eax, [ebp - 0x54]
push ebx
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [ebp - 0x10]
push ebx
push eax
mov dword [ebp - 0x54], esi
call sub.MSVCRT.dll_memset
add esp, 0x18
xor eax, eax
lea edi, [ebp - 0x253]
mov byte [ebp - 0x254], bl
push 0x7f
cmp dword [ebp + 0xc], 1
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x401df2
lea eax, [ebp - 0x254]
push 0x200
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x254]
push eax
call sub.MSVCRT.dll_strlen
cmp eax, ebx
pop ecx
je 0x401ddf
cmp byte [ebp + eax - 0x254], 0x5c
je 0x401ddf
dec eax
jne 0x401dd2
push dword [ebp + 0x14]
mov byte [ebp + eax - 0x253], bl
lea eax, [ebp + eax - 0x254]
jmp 0x401dfb
push dword [ebp + 0x14]
lea eax, [ebp - 0x254]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
xor eax, eax
pop ecx
lea edi, [ebp - 0x453]
push 0x7f
mov byte [ebp - 0x454], bl
pop ecx
rep stosd dword es:[edi], eax
push dword [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x454]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x454]
push 0x40c048
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x454]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x18
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x454]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x401e82
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10]
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40203e
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x4020a2
push 0x9c
lea eax, [ebp - 0x9c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x9c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x98], 5
jne 0x40209e
cmp dword [ebp - 0x94], 0
jne 0x40209e
cmp word [ebp - 8], 4
jae 0x40209e
xor eax, eax
leave
ret
push 2
jmp 0x4020a4
push 1
pop eax
leave
ret
Function at 0x4020a7
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
push edi
push 0x7f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x21b]
mov byte [ebp - 0x21c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
push eax
push 1
push ebx
push str.SYSTEMCurrentControlSetServicesUSBSTOREnum
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x1c], 0x200
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], 4
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x402103
xor eax, eax
jmp 0x40218c
lea eax, [ebp - 0x10]
push esi
push eax
lea eax, [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
push ebx
push ebx
push str.Count
push dword [ebp - 4]
call esi
xor eax, eax
lea edi, [ebp - 0x17]
mov byte [ebp - 0x18], bl
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor edi, edi
cmp dword [ebp - 8], ebx
jbe 0x40217f
push edi
lea eax, [ebp - 0x18]
push 0x40c430
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x21c]
push eax
push ebx
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x206]
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
test eax, eax
pop ecx
jne 0x402178
inc edi
cmp edi, dword [ebp - 8]
jb 0x402131
jmp 0x40217f
mov dword [ebp - 0xc], 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0xc]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x402190
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
cmp dword [ebp + 0xc], 0x8004
push ebx
jne 0x4021b8
push dword [ebp + 8]
call fcn.004020a7
dec eax
pop ecx
neg eax
sbb eax, eax
neg eax
jmp 0x402277
push esi
push edi
push 0x7f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x207]
mov byte [ebp - 0x208], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str._USBSTORCDROMVEN_CIDCPROD_USB_AUTORUNDISKREV_1.00
mov dword [ebp - 8], ebx
mov dword [ebp - 4], 1
stosb byte es:[edi], al
call sub.MSVCRT.dll_strlen
mov esi, eax
lea eax, [ebp - 0x208]
add esi, dword [ebp + 8]
mov dword [esp], str.SYSTEMControlSet001EnumUSBVid_1677Pid_0021_
push eax
call sub.MSVCRT.dll_strcpy
push str.480344590D001F10
call sub.MSVCRT.dll_strlen
push eax
lea eax, [ebp - 0x208]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_strncat]
lea eax, [ebp - 0x208]
push str.Device_Parameters
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x20
lea eax, [ebp + 0xc]
push eax
push 1
lea eax, [ebp - 0x208]
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
pop edi
pop esi
test eax, eax
je 0x40224f
push 1
pop eax
jmp 0x402277
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
push str.NewDeviceDesc
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40226b
mov dword [ebp - 4], ebx
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 4]
pop ebx
leave
ret
Function at 0x40227a
Capabilities:
Link many functions at runtime

Disassembly:
push esi
push edi
push 0x409644
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4024a4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.HDCSP_OpenDev
push edi
call esi
test eax, eax
mov dword [0x40cb08], eax
je 0x402499
push str.HDCSP_CloseDev
push edi
call esi
test eax, eax
mov dword [0x40cb0c], eax
je 0x402499
push str.HDCSP_ListAllDev
push edi
call esi
test eax, eax
mov dword [0x40cb10], eax
je 0x402499
push str.HD_TokenListContainer
push edi
call esi
test eax, eax
mov dword [0x40cb14], eax
je 0x402499
push str.HDPro_GetSn
push edi
call esi
test eax, eax
mov dword [0x40cb18], eax
je 0x402499
push str.HD_TokenGetCertSize
push edi
call esi
test eax, eax
mov dword [0x40cb1c], eax
je 0x402499
push str.HD_TokenGetCert
push edi
call esi
test eax, eax
mov dword [0x40cb20], eax
je 0x402499
push str.HDM1_ChangePIN
push edi
call esi
test eax, eax
mov dword [0x40cb24], eax
je 0x402499
push str.HDpro_GetPinTime
push edi
call esi
test eax, eax
mov dword [0x40cb28], eax
je 0x402499
push str.HDpro_ReloadPin
push edi
call esi
test eax, eax
mov dword [0x40cb2c], eax
je 0x402499
push str.ClearPinFromMem
push edi
call esi
test eax, eax
mov dword [0x40cb30], eax
je 0x402499
push str.LockUKey
push edi
call esi
test eax, eax
mov dword [0x40cb34], eax
je 0x402499
push str.UnlockUKey
push edi
call esi
test eax, eax
mov dword [0x40cb38], eax
je 0x402499
push str.HD_TokenFindCon
push edi
call esi
test eax, eax
mov dword [0x40cb3c], eax
je 0x402499
push str.HD_TokenCreateCon
push edi
call esi
test eax, eax
mov dword [0x40cb40], eax
je 0x402499
push str.HD_TokenImportRsaKeyObj
push edi
call esi
test eax, eax
mov dword [0x40cb44], eax
je 0x402499
push str.HD_TokenWrtCert
push edi
call esi
test eax, eax
mov dword [0x40cb48], eax
je 0x402499
push str.HDpro_InitDynamicCode
push edi
call esi
test eax, eax
mov dword [0x40cb04], eax
je 0x402499
push str.HDpro_IsSupportDynamicCode
push edi
call esi
test eax, eax
mov dword [0x40cb00], eax
je 0x402499
push str.HDpro_RemoveDynamicCode
push edi
call esi
test eax, eax
mov dword [0x40cafc], eax
je 0x402499
push str.HD_ToKenVerifySo
push edi
call esi
test eax, eax
mov dword [0x40caf8], eax
je 0x402499
push str.HD_ToKenVerifyUser
push edi
call esi
test eax, eax
mov dword [0x40caf4], eax
je 0x402499
push str.HD_IsDefaultPin
push edi
call esi
test eax, eax
mov dword [0x40caf0], eax
je 0x402499
push str.HD_ToKenChangeUser
push edi
call esi
test eax, eax
mov dword [0x40caec], eax
je 0x402499
push str.HD_IsOpenPage
push edi
call esi
test eax, eax
mov dword [0x40cae8], eax
je 0x402499
push str.HD_ChangeOpenPageFlag
push edi
call esi
test eax, eax
mov dword [0x40cae4], eax
jne 0x4024af
test edi, edi
je 0x402499
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0xc]
and dword [eax], 0
xor eax, eax
jmp 0x4024b8
mov eax, dword [esp + 0xc]
push 1
mov dword [eax], edi
pop eax
pop edi
pop esi
ret
Function at 0x403170
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push edi
push 0x7f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x207]
mov byte [ebp - 0x208], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 8]
mov dword [ebp - 4], 0x200
push eax
push 1
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsIEXPLORE.EXE
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403202
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x208]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 8]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
jne 0x403202
cmp dword [ebp - 4], 0x200
ja 0x403202
lea eax, [ebp - 0x208]
push eax
push dword [ebp + 8]
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp + 0xc]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
push 1
mov dword [eax], ecx
pop eax
jmp 0x403204
xor eax, eax
pop edi
pop ebx
leave
ret

Function at 0x403208
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
push ebx
push esi
push edi
push 0x44
pop esi
xor ebx, ebx
push esi
lea eax, [ebp - 0x58]
push ebx
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [ebp - 0x14]
push ebx
push eax
mov dword [ebp - 0x58], esi
call sub.MSVCRT.dll_memset
push 0x7f
xor eax, eax
pop ecx
lea edi, [ebp - 0x257]
mov byte [ebp - 0x258], bl
mov dword [ebp - 4], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00403170
add esp, 0x20
test eax, eax
je 0x4032cc
push 0x7f
xor eax, eax
pop ecx
lea edi, [ebp - 0x457]
mov byte [ebp - 0x458], bl
push dword [ebp + 8]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x458]
push str._s__s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x458]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, 1
jne 0x4032c9
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4037e3
Capabilities:
Persist via app paths registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push esi
xor esi, esi
push eax
push 2
push esi
push str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsUSBKeyTools.exe
mov dword [ebp - 4], esi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 1
mov dword [ebp + 0xc], esi
pop eax
cmp dword [ebp + 8], eax
je 0x403810
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push 4
push eax
push 4
push esi
push str.ShowAgain
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret
Function at 0x4045e2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
call sub.MFC42.DLL_AfxGetModuleState
mov esi, dword [eax + 0xc]
push 0x40c934
movzx eax, word [ebp + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x404623
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x404627
xor eax, eax
jmp 0x40464b
push 0
push ebx
push eax
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CMemFile::CMemFile
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x2c]
push eax
call fcn.00404652
lea ecx, [ebp - 0x2c]
mov esi, eax
call fcn.00407e3c
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x405a97
Capabilities:
Persist via app paths registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
xor esi, esi
push edi
cmp dword [0x40d828], esi
je 0x405b9f
lea eax, [ebp - 4]
mov ebx, str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsUSBKeyTools.exe
push eax
push 1
push esi
mov edi, SysReAllocString
push ebx
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x405b28
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x405b06
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405b9f
lea eax, [ebp - 0x10]
push 4
push eax
push 4
push esi
push str.ShowAgain
push dword [ebp - 4]
mov dword [ebp - 0x10], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x405b9f
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push esi
push esi
push str.ShowAgain
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 8], esi
je 0x405b6a
cmp dword [ebp - 8], 1
jne 0x405b9f
push 5
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x405b9f
mov ecx, dword [0x40d758]
cmp ecx, esi
je 0x405b9f
cmp dword [ebp - 8], 1
jne 0x405b99
push 1
call sub.MFC42.DLL_CWnd::ShowWindow
mov eax, dword [0x40d758]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x40d758]
push dword [eax + 0x20]
jmp 0x405b62
push esi
call sub.MFC42.DLL_CWnd::ShowWindow
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405f8c
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
push ebx
push esi
push 1
lea eax, [ebp - 0x2c]
pop esi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 2
lea eax, [ebp - 0x42c]
push 0x400
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
lea eax, [ebp - 0xc]
xor ebx, ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 8]
push esi
push eax
mov byte [ebp - 8], bl
mov byte [ebp - 7], bl
mov byte [ebp - 6], bl
mov byte [ebp - 5], bl
mov byte [ebp - 4], bl
mov byte [ebp - 3], 1
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x406046
push dword [ebp - 0xc]
lea eax, [ebp - 0x42c]
push 0x10000000
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
lea eax, [ebp - 0x42c]
push ebx
push eax
lea eax, [ebp - 0x2c]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push dword [ebp + 0xc]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push ebx
push eax
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, dword [ebp + 8]
push dword [ebp - 0xc]
mov dword [esi], eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [esi], ebx
jne 0x40604a
xor eax, eax
jmp 0x406072
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
jne 0x406070
cmp dword [ebp + 0xc], ebx
je 0x406070
push 6
push dword [ebp + 0xc]
call fcn.004077ff
pop ecx
pop ecx
mov eax, dword [esi]
pop esi
pop ebx
leave
ret

Function at 0x40719e
Capabilities:
Resume thread

Disassembly:
xor eax, eax
push esi
push eax
push 2
push eax
push eax
mov esi, ecx
push 0x409de8
call sub.MFC42.DLL_AfxBeginThread
push dword [esp + 8]
add esi, 0x2b4
mov dword [esi], eax
add eax, 0x74
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [esi]
pop ecx
pop ecx
push dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop esi
ret 4
Function at 0x4076d0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
xor ebx, ebx
push 0x20
mov dword [ebp - 8], ebx
call edi
push 0x20
push ebx
push eax
mov dword [ebp - 4], eax
call sub.MSVCRT.dll_memset
push dword [ebp - 4]
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call fcn.00404fd3
add esp, 0x1c
cmp eax, 1
jne 0x407776
cmp dword [ebp - 8], eax
jne 0x407776
push esi
mov dword [ebp - 0x10], ebx
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
mov esi, 0x124
mov dword [ebp - 0xc], eax
push esi
call edi
mov edi, eax
push esi
push ebx
push edi
call sub.MSVCRT.dll_memset
push dword [ebp - 0xc]
push dword [ebp + 8]
push edi
call sub.MSVCRT.dll_memcpy
push dword [ebp - 4]
call sub.MSVCRT.dll_strlen
push eax
lea eax, [edi + 0x104]
push dword [ebp - 4]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x30
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
push 0x4032d1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
pop esi
je 0x407776
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
pop edi
pop ebx
je 0x407787
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
leave
ret 4

Function at 0x407863
Capabilities:
Create pipe
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4e0
lea eax, [ebp - 0x2c]
push 1
push eax
mov dword [ebp - 8], 0x64
mov dword [ebp - 4], 0x50
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 2
lea eax, [ebp - 0x4e0]
push 0x400
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x90]
push eax
push str.Everyone
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
lea eax, [ebp - 0x90]
push eax
push 0x10000000
lea eax, [ebp - 0x4e0]
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
lea eax, [ebp - 0x4e0]
push 0
push eax
lea eax, [ebp - 0x2c]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x14], 0xc
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
mov eax, 0x800
push 0
push eax
push eax
push 0xff
push 6
push 3
push str..pipehdzb_device_message
mov dword [ebp - 0xc], 1
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [0x40ca24], eax
mov eax, ecx
leave
ret