joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100f617
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test byte [ebp + 8], 2
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
je 0x100f63b
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test byte [ebp + 8], 1
je 0x100f680
cmp dword [esi + 0x68], 0
je 0x100f680
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x100f661
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100f653
sub eax, edx
sar eax, 1
lea edi, [eax + eax]
push edi
mov ecx, esi
call fcn.0100f576
mov eax, dword [esi + 0x6c]
add eax, dword [esi + 0x68]
push edi
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add dword [esi + 0x6c], edi
test byte [ebp + 8], 8
mov esi, dword [sym.imp.msvcrt.dll_fprintf]
mov edi, 0x100f6c8
je 0x100f6a1
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
push edi
push eax
call esi
add esp, 0xc
test byte [ebp + 8], 4
je 0x100f6b7
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x20
push edi
push eax
call esi
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x100fc2d
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
xor edi, edi
cmp dword [0x101458c], edi
jne 0x100fd49
push esi
mov esi, 0x11c
push esi
lea eax, [ebp - 0x120]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push eax
call esi
test eax, eax
jne 0x100fc94
lea eax, [ebp - 0x120]
push eax
mov dword [ebp - 0x120], 0x114
call esi
mov eax, dword [ebp - 0x110]
dec eax
mov dword [0x101458c], edi
pop esi
je 0x100fd1c
dec eax
jne 0x100fd49
cmp dword [ebp - 0x11c], 5
jne 0x100fd09
mov eax, dword [ebp - 0x118]
sub eax, edi
je 0x100fcfd
dec eax
je 0x100fcea
dec eax
je 0x100fcd0
mov dword [0x101458c], 0x14
jmp 0x100fd49
cmp word [ebp - 0xc], 1
jb 0x100fce1
mov dword [0x101458c], 0x10
or dword [0x101458c], 4
jmp 0x100fd49
cmp word [ebp - 0xc], 2
jb 0x100fce1
mov dword [0x101458c], 8
jmp 0x100fce1
mov dword [0x101458c], 4
jmp 0x100fd49
cmp dword [ebp - 0x11c], 4
ja 0x100fd5b
mov dword [0x101458c], 2
cmp dword [ebp - 0x11c], 4
jne 0x100fd49
cmp dword [ebp - 0x118], edi
je 0x100fd3f
cmp dword [ebp - 0x118], 0xa
je 0x100fd3f
cmp dword [ebp - 0x118], 0x5a
jne 0x100fd49
mov dword [0x101458c], 1
mov ecx, dword [ebp - 4]
mov eax, dword [0x101458c]
xor ecx, ebp
pop edi
call fcn.010012fd
leave
ret
mov dword [0x101458c], 0x20
jmp 0x100fd49
Function at 0x100fd6c
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x20
lea eax, [ebp - 0x44]
push eax
push 8
push 0x404
mov esi, 0xc04
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x100fdc0
push 3
lea eax, [ebp - 0x44]
push 0x100fdd0
push eax
call sub.msvcrt.dll_wcsncmp
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
and esi, 0xfffff800
add esi, 0xc04
mov ecx, dword [ebp - 4]
mov ax, si
xor ecx, ebp
pop esi
call fcn.010012fd
leave
ret

Function at 0x100fddb
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
cmp ax, word [0x1014590]
jne 0x100fe76
push esi
lea eax, [ebp - 0x10]
push eax
push 1
xor esi, esi
push esi
push 0x100ff68
push 0x80000002
mov dword [ebp - 0x14], 6
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100fe75
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push esi
push 0x1010020
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x10]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, esi
pop edi
jne 0x100fe75
push 3
push dword [esi*8 + 0x100fe88]
lea eax, [ebp - 0xc]
push eax
call sub.msvcrt.dll__wcsnicmp
add esp, 0xc
test eax, eax
je 0x100fe67
inc esi
cmp esi, 0x1c
jae 0x100fe75
jmp 0x100fe46
mov ax, word [esi*8 + 0x100fe8c]
mov word [0x1014590], ax
pop esi
mov ecx, dword [ebp - 4]
mov ax, word [0x1014590]
xor ecx, ebp
call fcn.010012fd
leave
ret
Function at 0x4ccc1c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
mov byte [ebp - 1], 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push 2
push 0
push 0
push 0
push 0x4ccc9c
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExW
test eax, eax
jne 0x4ccc92
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 1
jmp 0x4ccc61
inc dword [ebp - 0x14]
add dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
cmp word [eax], 0
jne 0x4ccc5a
mov eax, dword [ebp - 0x14]
add eax, eax
push eax
mov eax, dword [ebp + 0xc]
push eax
push 3
push 0
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExW
mov byte [ebp - 1], 1
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 8

Function at 0x4ccd04
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov byte [ebp - 1], 0
lea eax, [ebp - 8]
push eax
push 1
push 0
push 0x4ccd80
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x4ccd75
mov dword [ebp - 0x10], 3
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x4ccd6c
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov byte [ebp - 1], 1
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 8

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
push 4
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x430072
nop
nop
mov ebx, 0x408e84
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x72414283
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
loop 0x430060
nop
nop
nop
nop
nop
mov eax, section..data
nop
cmp eax, 0
nop
nop
nop
je 0x4300d2
nop
nop
nop
nop
mov ebx, 0x42e1d0
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
mov esi, 0x57e07188
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
loop 0x4300c0
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x4016fd
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401754
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401754
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x401745
cmp esi, ecx
jae 0x401754
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edx, 1
jne 0x401733
cmp esi, ecx
jae 0x401754
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
jmp 0x401756
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x401fd2
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push ecx
lea ecx, [ebp - 0xc]
mov dword [ebp - 4], edx
mov edi, 0x80070003
call fcn.004018f4
lea ecx, [ebp - 0xc]
call fcn.00402630
mov esi, dword [ebp - 0xc]
test eax, eax
je 0x40211e
and dword [ebp - 0x18], 0
or edx, 0xf003f
push ecx
push ecx
push edx
push ecx
push ecx
push esi
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x424ebc
mov dword [ebp - 0x14], 0x200
call fcn.00401eb9
mov edi, eax
test edi, edi
jne 0x402109
mov eax, dword [ebp + 8]
sub eax, 1
je 0x4020c6
sub eax, 1
je 0x4020c2
sub eax, 1
je 0x4020b3
sub eax, 1
je 0x4020a4
sub eax, 3
je 0x402091
sub eax, 4
je 0x40205f
mov edi, 0x8007065d
jmp 0x4020d6
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push 8
push eax
mov dword [ebp - 0xc], ecx
push 0xb
push 0
push dword [ebp - 4]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
jle 0x4020d6
movzx edi, di
or edi, 0x80070000
jmp 0x4020d6
push 7
push dword [ebp + 0x10]
lea ecx, [ebp - 0x1c]
push ebx
push dword [ebp - 4]
call fcn.0040257d
jmp 0x4020d4
push dword [ebx]
lea ecx, [ebp - 0x1c]
push dword [ebp - 4]
call fcn.00402518
jmp 0x4020d4
mov eax, ebx
neg eax
sbb eax, eax
and eax, dword [ebp + 0x10]
push eax
push ebx
push 3
jmp 0x402072
push 2
jmp 0x4020c8
push 1
push ebx
push dword [ebp - 4]
lea ecx, [ebp - 0x1c]
call fcn.00402541
mov edi, eax
mov eax, dword [ebp - 0x18]
xor ecx, ecx
test eax, eax
je 0x402101
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, eax
test ecx, ecx
jle 0x4020f5
movzx ecx, cx
or ecx, 0x80070000
xor eax, eax
mov dword [ebp - 0x14], 0x200
mov dword [ebp - 0x18], eax
test edi, edi
jne 0x40210c
mov edi, ecx
jmp 0x40210c
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], 0x424ebc
test eax, eax
je 0x40211e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esi - 0x10]
call fcn.00401267
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40235b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, ecx
lea eax, [ebp - 4]
push eax
xor ecx, ecx
lea eax, [ebp - 8]
push ecx
push eax
push ecx
push dword [ebp + 8]
mov dword [ebp - 4], ecx
push dword [edi + 4]
mov dword [ebp - 8], ecx
call dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
mov esi, eax
test esi, esi
jle 0x402393
movzx esi, si
or esi, 0x80070000
test esi, esi
jne 0x4023eb
mov eax, dword [ebp - 4]
shr eax, 1
push 2
pop ecx
inc eax
mul ecx
setb cl
movsx ecx, cl
neg ecx
or ecx, eax
push ecx
call fcn.0041bf3c
cmp dword [ebp - 4], 0
pop ecx
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
je 0x4023e6
lea eax, [ebp - 4]
push eax
push ecx
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
mov esi, eax
test esi, esi
jle 0x4023eb
movzx esi, si
or esi, 0x80070000
jmp 0x4023eb
xor eax, eax
mov word [ecx], ax
pop edi
mov eax, esi
pop esi
leave
ret 8

Function at 0x4023f3
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov ebx, ecx
lea eax, [ebp - 4]
push eax
xor ecx, ecx
lea eax, [ebp - 8]
push ecx
push eax
push ecx
push dword [ebp + 8]
mov dword [ebp - 4], ecx
push dword [ebx + 4]
mov dword [ebp - 8], ecx
call dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
mov esi, eax
test esi, esi
jle 0x40242b
movzx esi, si
or esi, 0x80070000
test esi, esi
jne 0x40249f
mov edx, dword [ebp - 4]
test edx, edx
je 0x402497
shr edx, 1
add edx, 1
js 0x4024a7
push edi
mov edi, dword [ebp + 0xc]
xor ecx, ecx
inc ecx
mov eax, dword [edi]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edx
or ecx, eax
jge 0x402458
push edx
mov ecx, edi
call fcn.00401c4e
cmp dword [edi], 0
jne 0x402464
mov esi, 0x8007000e
jmp 0x40248b
lea eax, [ebp - 4]
push eax
push dword [edi]
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
push dword [ebx + 4]
call dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
mov esi, eax
test esi, esi
jle 0x40248b
movzx esi, si
or esi, 0x80070000
push 0xffffffffffffffff
mov ecx, edi
call fcn.0040291a
pop edi
jmp 0x40249f
mov ecx, dword [ebp + 0xc]
call fcn.0040197a
mov eax, esi
pop esi
pop ebx
leave
ret 8
push 0x80070057
call fcn.00401155
int3

Function at 0x402f14
Capabilities:
Compare security identifiers

Disassembly:
push ebx
push esi
lea ebx, [ecx + 4]
push edi
mov edi, edx
test ebx, ebx
je 0x402f4a
lea esi, [edi + 4]
test esi, esi
je 0x402f4a
call fcn.00402e76
test al, al
je 0x402f4a
mov ecx, edi
call fcn.00402e76
test al, al
je 0x402f4a
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
setne al
jmp 0x402f4c
xor al, al
pop edi
pop esi
pop ebx
ret
Function at 0x404960
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
push edi
lea ecx, [ebp - 0x24]
mov ebx, edx
call fcn.00403bb0
xor esi, esi
mov dword [ebp - 0x6c], 0x44
push 0x3c
lea eax, [ebp - 0x64]
mov dword [ebp - 0x68], esi
push esi
push eax
call fcn.0040b2c0
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x6c]
add esp, 0xc
mov dword [ebp - 0x40], 0x80
push edi
push eax
push esi
cmp dword [ebp + 8], esi
jne 0x4049a7
push esi
push esi
jmp 0x4049af
push dword [ebp + 8]
push 0x400
push esi
push esi
push esi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4049c7
call fcn.004076b2
mov esi, eax
jmp 0x404a08
movzx ecx, byte [0x42bd99]
neg ecx
sbb ecx, ecx
and ecx, 0x42bda0
je 0x404a08
xor eax, eax
mov dword [ebp - 0x14], ecx
inc eax
mov dword [ebp - 0x10], 7
push eax
push ecx
mov dword [ebp - 0xc], eax
call fcn.00405bd6
push dword [edi + 8]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push str._Started_process___u_
push eax
call fcn.00403b41
add esp, 0xc
lea ecx, [ebp - 0x24]
call fcn.00403c06
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x404c5d
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x42a040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov ebx, ecx
test esi, esi
jne 0x404c84
mov eax, 0x80070057
jmp 0x404d24
push edi
mov ecx, esi
call fcn.0040197a
push 0x208
xor edi, edi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0040b2c0
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push edi
push edi
push ebx
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
test edi, edi
jns 0x404d05
movzx ecx, bl
cmp ecx, 0x26
jne 0x404cc9
mov edx, 0x425168
jmp 0x404cd3
cmp ecx, 0x1c
jne 0x404cf4
mov edx, str.LocalAppData
lea ecx, [ebp - 0x210]
call fcn.00404c20
push eax
mov ecx, esi
call fcn.004018a6
mov ecx, dword [ebp - 0x210]
lea ecx, [ecx - 0x10]
call fcn.00401267
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x404d01
xor eax, eax
inc eax
jmp 0x404d23
mov eax, edi
jmp 0x404d23
lea eax, [ebp - 0x20c]
push eax
call fcn.004142ba
pop ecx
push eax
lea eax, [ebp - 0x20c]
mov ecx, esi
push eax
call fcn.00401ad6
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a549
leave
ret
Function at 0x404f01
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, ecx
lea ecx, [ebp - 4]
call fcn.00401953
mov eax, dword [ebp - 4]
xor esi, esi
inc esi
mov ecx, 0x104
mov edx, dword [eax - 8]
sub esi, dword [eax - 4]
sub edx, ecx
or esi, edx
jge 0x404f35
push ecx
lea ecx, [ebp - 4]
call fcn.00401c4e
mov eax, dword [ebp - 4]
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
push 0xffffffffffffffff
lea ecx, [ebp - 4]
mov esi, eax
call fcn.0040291a
test esi, esi
jne 0x404f57
mov edi, 0x80004005
jmp 0x404ffd
push ebx
push ecx
push ecx
lea ecx, [ebp - 4]
call fcn.004050f4
push 0
push 0x5c
lea ecx, [ebp - 4]
call fcn.004045f9
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x404f7d
mov ecx, dword [ebp - 4]
mov eax, dword [ecx - 0xc]
jmp 0x404f7f
mov eax, ebx
push eax
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
call fcn.00402886
mov esi, dword [ebp - 8]
mov ecx, esi
call fcn.00403abe
test al, al
jne 0x404fbc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404fbc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x50
je 0x404fbc
cmp edi, 0xb7
jne 0x404fdb
cmp ebx, 0xffffffff
je 0x404ff2
lea eax, [ebx + 1]
push eax
push 0x5c
lea ecx, [ebp - 4]
call fcn.004045f9
lea ecx, [esi - 0x10]
mov ebx, eax
call fcn.00401267
jmp 0x404f70
test edi, edi
jle 0x404fe8
movzx edi, di
or edi, 0x80070000
lea ecx, [esi - 0x10]
call fcn.00401267
jmp 0x404ffc
lea ecx, [esi - 0x10]
call fcn.00401267
xor edi, edi
pop ebx
mov ecx, dword [ebp - 4]
add ecx, 0xfffffff0
call fcn.00401267
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x405062
Capabilities:
Move file

Disassembly:
push esi
push edi
mov edi, edx
mov esi, ecx
call fcn.00403abe
test al, al
jne 0x405078
mov eax, 0x80070002
jmp 0x40509e
mov ecx, esi
call fcn.00403afa
movzx eax, al
xor eax, 1
add eax, 4
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x40509c
pop edi
pop esi
jmp fcn.004076b2
xor eax, eax
pop edi
pop esi
ret

Function at 0x405186
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x42a040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
test esi, esi
jne 0x4051a1
mov al, 1
jmp 0x4051e4
push 0x34
lea eax, [ebp - 0x38]
push 0
push eax
call fcn.0040b2c0
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4051dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x425210
call fcn.0040789f
pop ecx
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x40519d
mov eax, dword [ebp - 0x38]
shr eax, 0xa
and al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040a549
leave
ret
Function at 0x4051f1
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x20019
push ebx
push str.SoftwareBraveSoftwareUpdateDev_
push 0x80000002
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40521f
xor al, al
jmp 0x405267
push esi
push edi
push 4
pop edi
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], ebx
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], edi
push eax
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
push ebx
push str.IsEnabledLogToFile
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x405263
cmp dword [ebp - 8], edi
jne 0x405263
cmp dword [ebp - 0xc], ebx
je 0x405263
mov bl, 1
pop edi
mov al, bl
pop esi
pop ebx
leave
ret

Function at 0x405575
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov ebx, ecx
call fcn.004051f1
mov byte [ebx + 0x77], al
mov ecx, ebx
lea eax, [ebp - 4]
push eax
call fcn.00405ffc
mov edi, dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x14], edi
cmp dword [edi - 0xc], 0
je 0x405600
push edi
push 1
push str.EnableLogging
push str.LoggingSettings
call esi
push edi
push 1
test eax, eax
push str.ShowTime
setne al
push str.LoggingSettings
mov byte [ebx + 0x74], al
call esi
push edi
push 0
test eax, eax
push str.LogToOutputDebug
setne al
push str.LoggingSettings
mov byte [ebx + 0x76], al
call esi
push edi
push 1
test eax, eax
push str.AppendToFile
setne al
push str.LoggingSettings
mov byte [ebx + 0x78], al
call esi
test eax, eax
setne al
jmp 0x40560e
mov byte [ebx + 0x74], 1
mov al, 1
mov byte [ebx + 0x76], 1
mov byte [ebx + 0x78], 0
mov byte [ebx + 0x79], al
cmp byte [ebx + 0x75], 0
je 0x40561b
mov byte [ebx + 0x76], 1
xor eax, eax
mov byte [ebx], 1
mov dword [ebx + 4], 7
mov edi, esi
mov dword [ebp - 4], eax
mov edx, dword [eax + 0x42aae0]
mov ecx, dword [eax + 0x42aae4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
test edx, edx
je 0x405687
cmp ecx, 9
ja 0x405687
lea eax, [ebp - 8]
mov ecx, ebx
push eax
call fcn.00405ffc
mov esi, dword [ebp - 8]
cmp dword [esi - 0xc], 0
je 0x40566a
push esi
push 1
push dword [ebp - 0xc]
push str.LoggingLevel
call edi
jmp 0x40566d
xor eax, eax
inc eax
mov edx, dword [ebp - 0x10]
test eax, eax
setne cl
mov byte [ebx + edx*8], cl
lea ecx, [esi - 0x10]
mov dword [ebx + edx*8 + 4], eax
call fcn.00401267
mov eax, dword [ebp - 4]
add eax, 8
mov dword [ebp - 4], eax
cmp eax, 0x48
jb 0x40562c
call fcn.00401861
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x84], edx
lea ecx, [ecx - 0x10]
call fcn.00401267
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4056b3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea ecx, [ebp - 4]
call fcn.00401953
mov esi, dword [ebp - 4]
xor ecx, ecx
inc ecx
mov edx, 0x104
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edx
or ecx, eax
jge 0x4056e3
push edx
lea ecx, [ebp - 4]
call fcn.00401c4e
mov esi, dword [ebp - 4]
push esi
xor eax, eax
push eax
push eax
push 0x23
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x40571c
mov ecx, dword [ebp + 8]
push 0x4238b4
call fcn.004018f4
push 0xffffffffffffffff
lea ecx, [ebp - 4]
call fcn.0040291a
mov ecx, dword [ebp - 4]
add ecx, 0xfffffff0
call fcn.00401267
mov eax, dword [ebp + 8]
jmp 0x405756
push str.BraveSoftwareUpdateLog
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x4056f5
mov ecx, dword [ebp - 4]
lea ecx, [ecx - 0x10]
call fcn.00401bee
mov esi, dword [ebp + 8]
lea ecx, [ebp - 4]
add eax, 0x10
push 0xffffffffffffffff
mov dword [esi], eax
call fcn.0040291a
mov ecx, dword [ebp - 4]
add ecx, 0xfffffff0
call fcn.00401267
mov eax, esi
pop esi
leave
ret 4

Function at 0x405803
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, ecx
cmp byte [ebx + 0x77], 0
je 0x4058cb
cmp dword [ebx + 0xcc], 0
push esi
push edi
jne 0x4058b7
lea eax, [ebp - 4]
push eax
call fcn.0040575b
mov esi, dword [ebp - 4]
cmp dword [esi - 0xc], 0
je 0x405862
lea edx, [ebp - 4]
lea ecx, [ebp - 8]
call fcn.004075d5
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.00403abe
test al, al
jne 0x40586c
mov ecx, edi
call fcn.00404f01
test eax, eax
jns 0x40586c
lea ecx, [edi - 0x10]
call fcn.00401267
lea ecx, [esi - 0x10]
call fcn.00401267
jmp 0x4058c9
mov al, byte [ebx + 0x79]
push 0x20
mov byte [ebp - 8], al
call fcn.0041bf0c
pop ecx
push dword [ebp - 8]
mov ecx, eax
push esi
call fcn.004060e4
mov dword [ebx + 0xcc], eax
test eax, eax
jne 0x4058a7
push esi
push dword [ebx + 0x54]
push str.LOG_SYSTEM:___s_:_ERROR___Cannot_create_log_writer_to__s
call fcn.0040789f
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [edi - 0x10]
call fcn.00401267
lea ecx, [esi - 0x10]
call fcn.00401267
mov eax, dword [ebx + 0xcc]
test eax, eax
je 0x4058c9
push eax
mov ecx, ebx
call fcn.00405f89
pop edi
pop esi
pop ebx
leave
ret