joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003b50
Capabilities:
Create process on windows
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x460
mov rax, qword [0x140025008]
xor rax, rsp
mov qword [rsp + 0x450], rax
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x412
call fcn.140007690
mov edx, 0x208
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, str.system32msiexec.exe
lea rcx, [rsp + 0x30]
call fcn.140004a10
mov rbp, rax
test rax, rax
je 0x140003d06
mov rbx, 0xffffffffffffffff
mov rcx, rbx
nop dword [rax + rax]
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140003bd0
add rcx, 1
je 0x140003cfe
lea r14, [rcx*2 + 2]
mov rcx, r14
call fcn.14000c8f8
mov rsi, rax
test rax, rax
je 0x140003cfe
mov rdi, rax
mov rcx, r14
xor eax, eax
mov r8, rbx
rep stosb byte [rdi], al
movzx eax, word [0x140020fd4]
mov word [rsi], ax
nop word [rax + rax]
inc r8
cmp word [rbp + r8*2], 0
jne 0x140003c20
add r8, r8
lea rcx, [rsi + 2]
mov rdx, rbp
call fcn.140009d30
mov rcx, rbp
call fcn.14000c8e4
mov rax, rbx
inc rax
cmp word [rsi + rax*2], 0
jne 0x140003c46
add rax, 1
jne 0x140003c5a
xor ebp, ebp
jmp 0x140003ca8
lea r14, [rax*2 + 2]
mov rcx, r14
call fcn.14000c8f8
mov rbp, rax
test rax, rax
je 0x140003ca8
mov rdi, rbp
xor eax, eax
mov rcx, r14
rep stosb byte [rdi], al
nop dword [rax]
cmp word [rsi + rbx*2 + 2], ax
lea rbx, [rbx + 1]
jne 0x140003c80
lea rdi, [rbx + rbx]
mov rdx, rsi
mov r8, rdi
mov rcx, rbp
call fcn.140009d30
movzx eax, word [0x140020fd4]
mov word [rdi + rbp], ax
mov rcx, rsi
call fcn.14000c8e4
test rbp, rbp
je 0x140003d06
call fcn.1400036c0
mov rbx, rax
test rax, rax
je 0x140003cfe
mov dword [rsp + 0x28], 1
mov r9, rax
mov r8, rbp
mov qword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov rcx, rbp
mov rdi, rax
call fcn.14000c8e4
mov rcx, rbx
call fcn.14000c8e4
cmp edi, 0x20
setg al
jmp 0x140003d08
mov rcx, rbp
call fcn.14000c8e4
xor al, al
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.1400059f0
lea r11, [rsp + 0x460]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
Function at 0x140003d40
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x50
xor edi, edi
mov ebx, edi
mov qword [rsp + 0x40], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x40]
lea edx, [rdi + 8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140003d9e
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x34]
lea r9d, [rdi + 4]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x38]
mov dword [rsp + 0x34], 4
lea edx, [rdi + 0x14]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
cmovne ebx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140003dae
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140003eda
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
test rax, rax
je 0x140003eda
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], edi
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ecx, dword [rsp + 0x30]
mov rdx, rax
call fcn.140002a20
test al, al
je 0x140003eda
cmp qword [0x140027008], rdi
jne 0x140003e06
call fcn.140001c20
xor eax, eax
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret
call fcn.140002bd0
mov rbx, rax
test rax, rax
je 0x140003eda
mov rdx, rax
call fcn.140002dd0
mov rcx, qword [0x140027008]
movzx edi, al
test rcx, rcx
je 0x140003e33
call fcn.14000c8e4
mov qword [0x140027008], rbx
test dil, dil
je 0x140003eda
mov rcx, rbx
call fcn.1400055a0
test eax, eax
je 0x140003e80
call fcn.1400030f0
test al, al
je 0x140003e80
call fcn.140003b50
test al, al
jne 0x140003df9
mov rcx, qword [0x140027008]
test rcx, rcx
je 0x140003eda
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], 0
jne 0x140003e74
jmp 0x140003e9d
mov rcx, qword [0x140027008]
test rcx, rcx
je 0x140003eda
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], 0
jne 0x140003e93
cmp rax, 4
jb 0x140003eda
lea rcx, [rcx + rax*2]
mov r8d, 4
add rcx, 0xfffffffffffffff8
lea rdx, str..msi
call fcn.14000c4a0
test eax, eax
jne 0x140003eda
mov rcx, qword [0x140027008]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov rcx, qword [0x140027008]
call fcn.140001640
mov rbx, qword [rsp + 0x60]
mov eax, 0xffffffff
add rsp, 0x50
pop rdi
ret
Function at 0x1400046f0
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x250
mov rax, qword [0x140025008]
xor rax, rsp
mov qword [rsp + 0x230], rax
xor ebx, ebx
xor eax, eax
lock cmpxchg dword [0x140027068], ebx
mov ecx, eax
jne 0x140004752
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x140004745
lea rdx, str.RemoveDllDirectory
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [rbx + 2]
test rax, rax
jne 0x14000474a
mov ecx, 1
mov eax, ecx
xchg dword [0x140027068], eax
cmp ecx, 1
jne 0x1400048eb
mov qword [rsp + 0x260], rbp
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x268], rsi
xor edx, edx
mov qword [rsp + 0x270], rdi
mov r8d, 0x208
mov qword [rsp + 0x248], r14
mov qword [rsp + 0x240], r15
call fcn.140007690
mov edx, 0x104
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1400048e7
cmp word [rsp + 0x20], bx
je 0x1400048e7
mov ebp, ebx
lea rax, [rsp + 0x20]
mov rsi, rbx
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp word [rax + rdi*2], bx
jne 0x1400047d0
mov r15d, 0x5c
test rdi, rdi
je 0x140004803
movzx eax, word [rsp + rdi*2 + 0x1e]
mov rbx, rdi
cmp r15w, ax
je 0x140004803
mov ecx, 0x2f
cmp cx, ax
je 0x140004803
lea ebp, [rcx - 0x2e]
lea rbx, [rdi + 1]
add rbx, 7
je 0x1400048e7
lea rbx, [rbx*2 + 2]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x1400048e7
test rdi, rdi
je 0x140004851
lea r8, [rdi + rdi]
mov rcx, rax
lea rdx, [rsp + 0x20]
call fcn.140009d30
mov rsi, rdi
test ebp, ebp
je 0x14000485d
mov word [r14 + rsi*2], r15w
inc rsi
movsd xmm0, qword [str.msi.dll]
mov rcx, r14
movsd qword [r14 + rsi*2], xmm0
mov eax, dword [0x140020e48]
mov dword [r14 + rsi*2 + 8], eax
movzx eax, word [0x140020e4c]
mov word [r14 + rsi*2 + 0xc], ax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, rbx
mov r14, qword [rsp + 0x248]
mov rdi, qword [rsp + 0x270]
mov rsi, qword [rsp + 0x268]
mov rbp, qword [rsp + 0x260]
mov r15, qword [rsp + 0x240]
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.1400059f0
add rsp, 0x250
pop rbx
ret
xor eax, eax
jmp 0x1400048a6
xor edx, edx
lea rcx, str.msi.dll
mov r8d, 0x800
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
jmp 0x1400048ce
Function at 0x140004bc0
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
cmp byte [0x14002706c], 0
jne 0x140004ccb
call fcn.1400046f0
mov rbx, rax
test rax, rax
je 0x140004cbc
lea rdx, str.MsiViewExecute
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiCloseHandle
mov rcx, rbx
mov qword [0x140027020], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiViewFetch
mov rcx, rbx
mov qword [0x140027030], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiViewClose
mov rcx, rbx
mov qword [0x140027018], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiOpenDatabaseW
mov rcx, rbx
mov qword [0x140027040], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiDatabaseOpenViewW
mov rcx, rbx
mov qword [0x140027048], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiRecordGetStringW
mov rcx, rbx
mov qword [0x140027038], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiGetSummaryInformationW
mov rcx, rbx
mov qword [0x140027028], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.MsiSummaryInfoGetPropertyW
mov rcx, rbx
mov qword [0x140027010], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140027050], rax
mov byte [0x14002706c], 1
jmp 0x140004cd2
mov byte [0x14002706c], 1
xor al, al
add rsp, 0x20
pop rbx
ret
mov rax, qword [0x140027050]
cmp qword [0x140027048], 0
je 0x140004cc3
cmp qword [0x140027038], 0
je 0x140004cc3
cmp qword [0x140027020], 0
je 0x140004cc3
cmp qword [0x140027030], 0
je 0x140004cc3
cmp qword [0x140027018], 0
je 0x140004cc3
cmp qword [0x140027028], 0
je 0x140004cc3
cmp qword [0x140027040], 0
je 0x140004cc3
cmp qword [0x140027010], 0
je 0x140004cc3
test rax, rax
je 0x140004cc3
mov al, 1
add rsp, 0x20
pop rbx
ret

Function at 0x14000d514
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000d340
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400a87e0]
mov dword [rax], 1
mov rax, qword [0x1400a87f0]
mov dword [rax], 1
mov rax, qword [0x1400a8800]
mov dword [rax], 1
mov rax, qword [0x1400a8760]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400246b0
Capabilities:
Query environment variable

Disassembly:
push r14
mov eax, 0x10080
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.140086fb0
sub rsp, rax
xor eax, eax
xor edx, edx
xor esi, esi
mov r14d, 0x28
movzx edi, byte [rcx]
mov word [rsp + 0x80], ax
mov r12, rcx
lea rbp, [rsp + 0x30]
lea r13, [rsp + 0x2e]
mov word [rsp + 0x30], dx
test dil, dil
je 0x140024759
nop dword [rax]
mov rax, r14
lea rbx, [rbp + rsi*2]
sub rax, rsi
cmp word [rbp + rsi*2], 0
je 0x14002471e
nop dword [rax + rax]
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x140024710
test rax, rax
je 0x140097e2e
mov rcx, rbx
add rsi, 1
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, r13
mov byte [rsp + 0x2e], dil
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2f], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [r12 + rsi]
test dil, dil
jne 0x1400246f8
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, rbp
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x140024788
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10080
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop

Function at 0x1400247a0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
xor eax, eax
xor esi, esi
mov r13d, 0x28
movzx edi, byte [rcx]
mov word [rsp + 0x30], ax
mov rbp, rcx
mov r14, rdx
lea r15, [rsp + 0x30]
lea r12, [rsp + 0x2e]
test dil, dil
je 0x140024841
nop word [rax + rax]
mov rax, r13
lea rbx, [r15 + rsi*2]
sub rax, rsi
cmp word [r15 + rsi*2], 0
je 0x140024806
nop word [rax + rax]
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x1400247f8
test rax, rax
je 0x140097e34
mov rcx, rbx
add rsi, 1
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, r12
mov byte [rsp + 0x2e], dil
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2f], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [rbp + rsi]
test dil, dil
jne 0x1400247e0
mov rdx, r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14003bf30
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.1400246b0
test rax, rax
je 0x14003c070
mov rdx, 0xffffffffffffffff
mov rcx, rax
lea r14, [rsp + 0x40]
mov r15d, 0x4e
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov rdi, r14
lea r12, [rsi + 0x28]
lea rbp, [rsp + 0x3e]
mov r13, rax
xor eax, eax
mov word [rsp + 0x40], ax
nop
mov rax, r12
mov rbx, rdi
sub rax, rsi
cmp word [rdi], 0
je 0x14003bfae
nop
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x14003bfa0
test rax, rax
je 0x140097ed6
mov rcx, rbx
add rsi, 1
add rdi, 2
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, rbp
mov byte [rsp + 0x3e], r15b
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x3f], 0
call sub.msvcrt.dll_mbstowcs
movzx r15d, byte [rsi]
test r15b, r15b
jne 0x14003bf90
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python38.dll__PyRuntime]
mov rdx, qword [0x1400b9f18]
mov rsi, qword [rax + 0x510]
mov rax, qword [0x1400a8920]
mov rbx, qword [rax + 0x1c0]
test rdx, rdx
je 0x14003c0c8
mov r8, rbx
mov rcx, rsi
call fcn.140027eb0
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.140037ba0
sub qword [rbx], 1
jne 0x14003c059
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [rdx + 0x30]
mov rax, qword [rsp + 0x28]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x1400b97f0]
lea rsi, [0x1400b97f0]
test bl, bl
je 0x14003c090
mov rax, qword [0x1400b97f8]
lea rsi, [0x1400b97f8]
test rax, rax
jne 0x14003c059
cmp byte [0x1400b9a02], 0
jne 0x14003c0a6
movzx ecx, bl
call fcn.140006450
mov rdx, 0xffffffffffffffff
lea rcx, [0x1400b9800]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x14003c0f5
add qword [rax], 1
jmp 0x14003c059
mov rdx, qword [0x1400b9e90]
mov rdi, qword [rax + 0x1b0]
test rdx, rdx
je 0x14003c100
mov r8, rdi
mov rcx, rsi
call fcn.140027eb0
mov qword [0x1400b9f18], rax
mov rdx, rax
jmp 0x14003c023
call qword [sym.imp.python38.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1400a121e]
call qword [sym.imp.python38.dll_PyImport_ImportModule]
mov qword [0x1400b9e90], rax
mov rdx, rax
test rax, rax
je 0x140097ed6
jmp 0x14003c0db
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call qword [sym.imp.python38.dll_PyErr_NoMemory]
call sub.msvcrt.dll_abort
nop
Function at 0x14007c170
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp byte [0x1400b97d9], 0
mov rbp, rcx
mov r12, rdx
mov rdi, r8
je 0x14007c1f8
lea rdx, [0x1400a47f2]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x14007c260
mov rbx, qword [0x1400b9698]
jmp 0x14007c1b5
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x14007c1b0
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, rbp
mov rdx, r12
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp fcn.14006b480
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x1400b9698], rax
mov ebx, dword [rax]
mov qword [0x1400b9698], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x1400b9698], rdx
call fcn.14007b2a0
cmp eax, ebx
jne 0x14007c2fa
mov byte [0x1400b97d9], 1
jmp 0x14007c18e
cmp byte [0x1400b97d8], 0
jne 0x14007c1a5
mov rbx, qword [sym.imp.python38.dll_PyDict_New]
lea rsi, [0x1400b8e88]
call rbx
mov qword [0x1400ba108], rax
call rbx
mov qword [0x1400ba100], rax
call rbx
mov qword [0x1400ba0f8], rax
call rbx
mov qword [0x1400ba0f0], rax
call rbx
mov qword [0x1400ba0e8], rax
call rbx
mov qword [0x1400ba0e0], rax
call rbx
mov qword [0x1400ba0d8], rax
call rbx
mov r13, qword [sym.imp.python38.dll_PyLong_FromLong]
mov rbx, 0xfffffffffffffffb
mov qword [0x1400ba0d0], rax
nop dword [rax]
mov ecx, ebx
call r13
mov qword [rsi + rbx*8], rax
add rbx, 1
cmp rbx, 0x101
jne 0x14007c2d8
mov byte [0x1400b97d8], 1
jmp 0x14007c1a5
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140085c90
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.140097380
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.140097380
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x140086962
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400ba568]
test eax, eax
je 0x1400869fa
lea rax, [0x1400ba540]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400ba570]
mov qword [rbp - 8], rax
jmp 0x1400869de
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400869d2
cmp qword [rbp - 0x10], 0
je 0x1400869d2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140086998
lea rax, [0x1400ba540]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400869fb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140086b00
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140086b28
mov eax, 0
jmp 0x140086b76
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140086b51
mov eax, 0
jmp 0x140086b76
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140086b71
mov eax, 0
jmp 0x140086b76
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x140086b7c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140086bfa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140086bf1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140086bf1
mov rax, qword [rbp - 8]
jmp 0x140086c0f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140086bc4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400081f0
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xf0
mov rax, qword [0x140322cd0]
xor rax, rsp
mov qword [rbp + 0x4f], rax
xor esi, esi
mov qword [rbp - 0x21], rsi
movdqa xmm0, xmmword [0x1402d64f0]
movdqu xmmword [rbp - 0x11], xmm0
mov word [rbp - 0x21], si
lea rcx, [rbp - 0x21]
call fcn.140063a00
mov ebx, eax
test eax, eax
js 0x14000826b
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
test eax, eax
je 0x140008257
mov ebx, esi
jmp 0x14000826b
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov qword [rbp - 0x41], rsi
movdqa xmm0, xmmword [0x1402d64f0]
movdqu xmmword [rbp - 0x31], xmm0
mov word [rbp - 0x41], si
test ebx, ebx
js 0x140008398
lea rdx, [rbp - 0x41]
mov cl, 1
call fcn.14006547c
mov ebx, eax
test eax, eax
js 0x140008398
mov r8d, SafeArrayUnaccessData
lea rdx, str.FileSyncHelperlogs
lea rcx, [rbp - 0x41]
call fcn.14000a1ec
lea rdx, [rbp - 0x41]
cmp qword [rbp - 0x29], 8
cmovae rdx, qword [rbp - 0x41]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea rax, [rbp - 0x41]
cmp qword [rbp - 0x29], 8
cmovae rax, qword [rbp - 0x41]
xor r9d, r9d
mov byte [rsp + 0x48], sil
mov dword [rsp + 0x40], 3
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], sil
xor r8d, r8d
lea rsi, str.FileSyncHelper
mov rdx, rsi
mov rcx, rsi
call fcn.140020594
mov ebx, eax
lea rax, [0x1402d47a0]
mov qword [rbp + 0x37], rax
mov dword [rbp + 0x2f], 3
mov dword [rbp + 0x3f], ebx
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x38], 2
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x7df240a5
lea rax, [0x1402d5068]
mov qword [rsp + 0x20], rax
lea r9, str.InitializeLogging
mov r8d, reloc.OLEAUT32.dll_RegisterTypeLib
lea rdx, str.D:dbs_shodct0220_180237_0cmdcclientonedriveProductElevatedHelperServerexewinmain.cpp
lea rcx, [rbp - 1]
call fcn.14001f8a0
lea rdx, [rbp + 0x2f]
lea rcx, [rbp - 1]
call fcn.140020acc
call fcn.1400206e4
mov rdx, rsi
lea rcx, str.App_Name
call fcn.140020860
nop
lea rcx, [rbp - 0x41]
call fcn.14000a188
nop
lea rcx, [rbp - 0x21]
call fcn.14000a188
mov eax, ebx
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.1400b2cd0
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret