joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401e21
Capabilities:
Get common file path

Disassembly:
push 0xe34
mov eax, 0x408b3c
call fcn.00408900
mov esi, ecx
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x21c]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0xe2c]
call fcn.00401995
test eax, eax
mov edi, 0x104
lea eax, [ebp - 0x21c]
je 0x401e8a
push str.HKEY_USERS_
push edi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0xe2c]
push eax
lea eax, [ebp - 0x21c]
push edi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
jmp 0x401e97
push 0x4094a8
push edi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x21c]
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push edi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
mov dword [ebp - method.RegUtil.virtual_0], vtable.RegUtil.0
mov dword [ebp - 0xe38], ebx
mov dword [ebp - 0xe3c], ebx
add esp, 4
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x21c]
push esi
push str.Local_AppData
push eax
call fcn.0040737a
mov edx, esi
mov ecx, str.GetUserLocalAppDataFolder_:_:_folderpath_via_registry_:
call fcn.004016a9
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x401eec
sub ecx, edx
sar ecx, 1
jne 0x401fa0
push 0x208
lea eax, [ebp - 0x62c]
mov dword [ebp - 0xe34], ebx
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x424]
push 0x208
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x424]
lea edx, [ebp - 0x62c]
lea ecx, [ebp - 0xe34]
push eax
call fcn.00401c8d
pop ecx
test eax, eax
je 0x401f85
lea eax, [ebp - 0xe30]
mov dword [ebp - 0xe30], ebx
push eax
push dword [ebp - 0xe34]
push ebx
push 0x409360
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
push dword [ebp - 0xe30]
push edi
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
mov ecx, str.Get_tUserLocalAppDataFolder_:_:_folderpath_new2_:
jmp 0x401f99
push ebx
push 0x1c
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x401fa2
mov ecx, str.GetUserLocalAppDataFolder_:_:_folderpath_old_:
mov edx, esi
call fcn.004016a9
mov bl, 1
mov al, bl
call fcn.004088be
ret
Function at 0x401fab
Capabilities:
Get common file path

Disassembly:
push 0x21c
mov eax, 0x408b76
call fcn.00408900
mov ebx, ecx
xor esi, esi
mov dword [ebp - method.RegUtil.virtual_0], vtable.RegUtil.0
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x224], esi
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], esi
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 4
mov dword [ebp - 0x21c], esi
lea eax, [ebp - 0x218]
mov edi, str.Shell
push eax
push edi
push str.HKEY_CURRENT_USERSOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
call fcn.0040737a
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x218]
call fcn.00401154
test eax, eax
js 0x402027
cmp dword [ebp - 0x21c], esi
jne 0x402074
push ecx
push ecx
lea eax, [ebp - 0x218]
push eax
push edi
push str.HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
call fcn.0040737a
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x218]
call fcn.00401154
test eax, eax
js 0x40205a
cmp dword [ebp - 0x21c], 0
jne 0x402074
push str.explorer.exe
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea edi, [ebp - 0x218]
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, si
jne 0x40207d
push esi
push esi
push esi
lea eax, [ebp - 0x218]
sub edi, ecx
push eax
sar edi, 1
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea ecx, [edi + 1]
cmp ecx, eax
jne 0x4020ca
lea eax, [ebp - 0x218]
push eax
push 0x104
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
test eax, eax
je 0x40212c
lea edx, [ebp - 0x218]
mov ecx, str.GetShellProcName::_Failed_to_copy_shell_full_path_to_return_var
jmp 0x40213b
mov edi, 0x104
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x402118
cmp eax, edi
ja 0x402118
push 0x4094a4
push edi
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
push ebx
call edi
add esp, 0xc
test eax, eax
jne 0x40210b
lea eax, [ebp - 0x218]
push eax
push 0x104
push ebx
call edi
add esp, 0xc
test eax, eax
je 0x40212c
lea edx, [ebp - 0x218]
mov ecx, str.GetShellProcName::_Failed_to_concat_Windows_Dir_to_shell_name_:
jmp 0x40213b
push str.C:Windowsexplorer.exe
push edi
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
test eax, eax
jne 0x402131
xor esi, esi
inc esi
jmp 0x402140
mov edx, 0x409458
mov ecx, str.GetShellProcName::_Failed_to_copy_hard_coded_shell_value_:
call fcn.004016a9
mov eax, esi
call fcn.004088be
ret
Function at 0x402148
Capabilities:
Create process on windows
Impersonate user

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
xor esi, esi
lea eax, [ebp - 0x414]
push esi
push eax
mov edi, ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x414]
call fcn.00401fab
test eax, eax
je 0x402313
lea ecx, [ebp - 0x414]
call fcn.004017ed
mov ebx, eax
test ebx, ebx
je 0x402313
push 0x208
lea eax, [ebp - 0x20c]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
push edi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push 0x44
lea eax, [ebp - 0x45c]
mov dword [ebp - 0x464], esi
push esi
push eax
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [ebp - 0x460], esi
lea edi, [ebp - 0x474]
add esp, 0x24
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
push esi
push 0x400
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x4022be
lea eax, [ebp - 0x464]
push eax
push 0xb
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4022be
lea eax, [ebp - 0x460]
xor edi, edi
push eax
inc edi
push edi
push 2
push esi
push 0x18b
push dword [ebp - 0x464]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4022be
lea eax, [ebp - 0x418]
mov dword [ebp - 0x45c], 0x44
push eax
mov dword [ebp - 0x418], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
jne 0x402272
mov eax, esi
mov dword [ebp - 0x418], eax
jmp 0x402278
mov eax, dword [ebp - 0x418]
test eax, eax
lea eax, [ebp - 0x474]
push eax
lea eax, [ebp - 0x45c]
push eax
push esi
push esi
lea eax, [ebp - 0x20c]
push 0x8000000
je 0x4022a8
push eax
push esi
push esi
push dword [ebp - 0x460]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
jmp 0x4022b9
push esi
push esi
push esi
push eax
push esi
push dword [ebp - 0x460]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
cmovne esi, edi
cmp dword [ebp - 0x464], 0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4022d5
push dword [ebp - 0x464]
call edi
test ebx, ebx
je 0x4022dc
push ebx
call edi
cmp dword [ebp - 0x474], 0
je 0x4022ed
push dword [ebp - 0x474]
call edi
cmp dword [ebp - 0x470], 0
je 0x4022fe
push dword [ebp - 0x470]
call edi
cmp dword [ebp - 0x460], 0
je 0x40230f
push dword [ebp - 0x460]
call edi
mov eax, esi
jmp 0x402315
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret
Function at 0x402324
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
lea eax, [ebp - 0x14]
xor ebx, ebx
push eax
push 0x20008
mov esi, ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4023f7
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push eax
push ebx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
xor eax, eax
inc eax
push eax
push dword [ebp - 0x14]
call ebx
test eax, eax
jne 0x4023ee
push edi
push dword [ebp - 0x10]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4023ed
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push edi
push 1
push dword [ebp - 0x14]
call ebx
test eax, eax
je 0x4023dd
xor ecx, ecx
mov word [ebp - 8], 0x500
lea eax, [ebp - 0x18]
mov dword [ebp - 0xc], ecx
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push 0x12
xor ebx, ebx
lea eax, [ebp - 0xc]
inc ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4023dd
push dword [edi]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
cmovne esi, ebx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret

Function at 0x402407
Capabilities:
Download url
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, 0x208
lea eax, [ebp - 0x20c]
push ebx
push 0
push eax
mov edi, edx
mov esi, ecx
call sub.VCRUNTIME140.dll_memset
push esi
mov esi, 0x104
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
push ebx
xor ebx, ebx
lea eax, [ebp - 0x414]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x30
lea eax, [ebp - 0x414]
push ebx
push ebx
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.urlmon.dll_URLDownloadToFileW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret
Function at 0x4031c4
Capabilities:
Enumerate process modules
Get process image filename

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 5
mov ebx, ecx
lea edi, [ebp - 0x210]
pop ecx
mov esi, str._unknown_
lea eax, [ebp - 0x1fc]
rep movsd dword es:[edi], dword [esi]
push 0x1f6
xor edi, edi
push edi
push eax
call sub.VCRUNTIME140.dll_memset
push 0x16
call fcn.00407e3d
push str.chrome.exe
mov esi, eax
mov dword [ebp - 0x220], edi
push 0xb
push esi
mov dword [ebp - 0x21c], esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0x1c
push ebx
push edi
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x403340
cmp ebx, 0xffffffff
je 0x403340
lea eax, [ebp - 0x214]
push eax
push 4
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_K32EnumProcessModules]
mov esi, 0x105
test eax, eax
push esi
lea eax, [ebp - 0x210]
push eax
je 0x40327d
push dword [ebp - 0x218]
push ebx
call dword [sym.imp.KERNEL32.dll_K32GetModuleBaseNameW]
jmp 0x403294
push ebx
call dword [sym.imp.KERNEL32.dll_K32GetProcessImageFileNameW]
test eax, eax
mov ecx, edi
push 1
pop eax
cmovne ecx, eax
mov dword [ebp - 0x220], ecx
lea eax, [ebp - 0x210]
push eax
push str.chrome.exe
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4032b4
mov esi, dword [ebp - 0x21c]
jmp 0x403317
cmp dword [ebp - 0x220], edi
je 0x403323
push esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcslwr_s]
lea eax, [ebp - 0x210]
push eax
call esi
push 0xb
push dword [ebp - 0x21c]
call esi
mov esi, dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push esi
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov edx, eax
add esp, 0x18
test edx, edx
je 0x403329
mov ecx, esi
lea eax, [ecx + 2]
mov dword [ebp - 0x220], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4032fe
sub ecx, dword [ebp - 0x220]
sar ecx, 1
cmp word [edx + ecx*2], di
jne 0x403329
xor eax, eax
mov ecx, str._t_tFound_Match_:
lea edi, [eax + 1]
jmp 0x40332e
mov esi, dword [ebp - 0x21c]
mov ecx, str._t_tChecking_:
lea edx, [ebp - 0x210]
call fcn.004016a9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00407af4
pop ecx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret

Function at 0x403358
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00408a30
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x1008]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_K32EnumProcesses]
test eax, eax
je 0x4033b8
mov edi, dword [ebp - 0x1008]
xor esi, esi
shr edi, 2
test edi, edi
je 0x4033b8
mov ecx, dword [ebp + esi*4 - 0x1004]
test ecx, ecx
je 0x4033b3
push ecx
call fcn.004031c4
pop ecx
test eax, eax
jne 0x4033c8
inc esi
cmp esi, edi
jb 0x40339d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00407ae6
leave
ret
xor eax, eax
inc eax
jmp 0x4033ba
Function at 0x403d6f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x403d92
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
jmp 0x403e51
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
test ecx, ecx
je 0x403db8
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x403dbd
xor ecx, ecx
mov dword [ebp - 8], eax
mov eax, ecx
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x403e1d
jg 0x403dd2
test esi, esi
je 0x403e1d
test ecx, ecx
jl 0x403e18
jg 0x403ddc
test eax, eax
je 0x403e18
cmp edi, ecx
jg 0x403dee
jl 0x403de6
cmp esi, eax
jae 0x403dee
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [ebp - 4]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x403e20
mov ecx, dword [ebp + 8]
jmp 0x403e2a
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x403e45
jg 0x403e2a
test esi, esi
je 0x403e45
cmp dword [ebx + 0x4c], 0
je 0x403e45
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x403e56
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
test esi, esi
jg 0x403e80
jl 0x403e77
test ebx, ebx
jne 0x403e80
xor eax, eax
xor edx, edx
jmp 0x403f3c
cmp dword [ecx + 0x38], 0
je 0x403e94
push esi
push ebx
push edx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
jmp 0x403f3c
mov eax, dword [ecx + 0x1c]
push edi
mov edi, ebx
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x403ed4
mov eax, dword [ecx + 0x2c]
cmp dword [eax], 0
jbe 0x403ed4
cmp dword [eax], ebx
mov esi, ebx
cmovb esi, dword [eax]
push esi
push dword [ebp - 0xc]
push edx
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 8]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
mov eax, dword [ecx + 0x2c]
sub dword [eax], esi
mov eax, dword [ecx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0x10]
cmp dword [ecx + 0x4c], 0
je 0x403f32
call fcn.004048ad
mov edx, dword [ebp - 4]
mov eax, edi
cmp edi, 0xfff
jbe 0x403f1c
push dword [ecx + 0x4c]
push 0xfff
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, dword [ebp - 4]
mov ecx, 0xfff
add edx, eax
add esp, 0x10
sub edi, eax
mov dword [ebp - 4], edx
cmp eax, ecx
jne 0x403f32
cmp edi, ecx
mov ecx, dword [ebp - 8]
ja 0x403eec
mov eax, edi
test eax, eax
je 0x403f32
push dword [ecx + 0x4c]
push edi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
sub edi, eax
sub ebx, edi
mov eax, ebx
sbb esi, 0
mov edx, esi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4041e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
or edi, 0xffffffff
mov esi, ecx
cmp ebx, edi
jne 0x404206
xor eax, eax
jmp 0x4042cb
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x40422f
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
add eax, ecx
cmp ecx, eax
jae 0x40422f
dec dword [edx]
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
mov eax, ebx
jmp 0x4042cb
cmp dword [esi + 0x4c], 0
je 0x4042c9
mov ecx, esi
call fcn.004048ad
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40425d
movsx eax, bl
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, edi
pop ecx
pop ecx
cmove ebx, edi
jmp 0x404228
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x404298
sub eax, 1
je 0x404298
dec eax
sub eax, 1
jne 0x4042c9
movsx eax, byte [ebp - 0x25]
jmp 0x40424a
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x24]
sub eax, ecx
mov dword [ebp - 0x34], eax
je 0x4042bc
push dword [esi + 0x4c]
push eax
mov eax, ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x34], eax
jne 0x4042c9
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
cmovne edi, ebx
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret 4

Function at 0x4048d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 0x38], ebx
je 0x404928
cmp byte [esi + 0x3d], bl
je 0x404928
mov eax, dword [esi]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x404962
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, ebx
je 0x404939
sub eax, 1
je 0x40493c
dec eax
sub eax, 1
jne 0x404962
mov byte [esi + 0x3d], bl
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret
mov byte [esi + 0x3d], bl
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40495a
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x404962
cmp byte [esi + 0x3d], bl
sete al
jmp 0x40492a
xor al, al
jmp 0x40492a
Function at 0x40737a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x1c], eax
call fcn.0040723c
mov ebx, 0x208
mov edi, eax
push ebx
call fcn.00407e3d
push ebx
xor ecx, ecx
mov dword [ebp - 0x14], eax
push ecx
push eax
call sub.VCRUNTIME140.dll_memset
push 0x20a
call fcn.00407e3d
push 0x20a
mov ebx, eax
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0x20
mov dword [ebp - 8], 0x20a
push dword [ebp - 0x14]
push esi
call fcn.004076bb
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407444
lea eax, [ebp - 8]
xor edi, edi
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 0x18]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407444
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x407423
sub ecx, edx
sar ecx, 1
cmp ecx, 0x208
jae 0x407444
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.00407af4
push ebx
call fcn.00407af4
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret 0x14

Function at 0x40746c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
push esi
call fcn.0040723c
push 0x208
mov edi, eax
call fcn.00407e3d
mov dword [esp], 0x208
push ebx
push eax
mov dword [ebp - 0xc], eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push dword [ebp - 0xc]
push esi
call fcn.004076bb
push str.https:__clients2.google.com_service_update2_crx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [ebp - 0xc]
push ebx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 8]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 8]
push eax
push 0xf003f
push ebx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40751f
mov eax, dword [ebp - 0x10]
add eax, eax
push eax
push str.https:__clients2.google.com_service_update2_crx
push 1
push ebx
push str.update_url
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebx
push esi
call fcn.00407af4
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407ae6
leave
ret 0x10