joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100022a50
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rbp
mov rbp, rsp
lea rsp, [rsp - 0x60]
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
nop
mov dword [rbp - 4], 0x55555555
mov dword [rbp - 8], 0x55555555
lea rax, [rbp - 0x18]
mov r8d, 0x55
mov edx, 0x10
mov rcx, rax
call fcn.1000029a0
lea rcx, [rbp - 0x28]
mov r8d, 0x55
mov edx, 0x10
call fcn.1000029a0
mov byte [rbp - 0x30], 0x55
mov eax, dword [global_defaultsecuritymode]
mov dword [rbp - 0x2c], eax
xor edx, edx
lea rcx, str._kuhl_m_kerberos_init_
call dbg.LOG
mov word [rbp - 0x28], 8
mov word [PROCESSNAME.LENGTH], 9
lea rax, str.Minlogon
mov qword [rbp - 0x20], rax
call dbg.ISELEVATED
test al, al
je 0x100022b4f
xor edx, edx
lea rcx, str.iselevatedtrue
call dbg.LOG
lea rcx, [rbp - 0x38]
call fcn.100006520
mov ecx, dword [0x100045d50]
call dbg.IMPERSONATEPID
mov dl, al
xor r8b, r8b
lea rcx, [rbp - 0x40]
call fcn.100026c40
mov r8, qword [rbp - 0x40]
xor r9d, r9d
lea rdx, str.impersonatepid:
lea rcx, [rbp - 0x38]
call fcn.1000066c0
mov rcx, qword [rbp - 0x38]
xor edx, edx
call dbg.LOG
lea r8, [rbp - 0x2c]
lea rdx, [0x100043de0]
lea rcx, [rbp - 0x28]
call qword [0x100065f80]
mov dword [rbp - 8], eax
call sub.advapi32.dll_RevertToSelf
jmp 0x100022b5f
lea rcx, [0x100043de0]
call qword [0x100065f60]
mov dword [rbp - 8], eax
cmp dword [rbp - 8], 0
jne 0x100022c0d
xor edx, edx
lea rcx, str.LsaLookupAuthenticationPackage...
call dbg.LOG
lea rcx, [rbp - 0x18]
xor r8d, r8d
mov edx, 0x10
call fcn.1000022d0
mov word [rbp - 0x18], 8
mov word [KERBEROSPACKAGENAME.LENGTH], 9
lea rax, str.Kerberos
mov qword [rbp - 0x10], rax
lea r8, [0x100043dc0]
lea rdx, [rbp - 0x18]
mov rcx, qword [0x100043de0]
call qword [0x100065f70]
mov dword [rbp - 8], eax
lea rcx, [rbp - 0x40]
call fcn.100006520
mov edx, dword [rbp - 8]
mov r8d, 8
lea rcx, [rbp - 0x38]
call fcn.1000237b0
mov r8, qword [rbp - 0x38]
xor r9d, r9d
lea rdx, str.status:
lea rcx, [rbp - 0x40]
call fcn.1000066c0
mov rcx, qword [rbp - 0x40]
xor edx, edx
call dbg.LOG
cmp dword [rbp - 8], 0
sete al
and eax, 0xff
neg eax
mov dword [0x100043dd0], eax
jmp 0x100022c4d
lea rcx, [rbp - 0x40]
call fcn.100006520
mov edx, dword [rbp - 8]
mov r8d, 8
lea rcx, [rbp - 0x38]
call fcn.1000237b0
mov r8, qword [rbp - 0x38]
xor r9d, r9d
lea rdx, str.kuhl_m_kerberos_init_failed:
lea rcx, [rbp - 0x40]
call fcn.1000066c0
mov rcx, qword [rbp - 0x40]
mov edx, 1
call dbg.LOG
mov eax, dword [rbp - 8]
mov dword [rbp - 4], eax
nop
mov rcx, rbp
call dbg.fin$0000003B
mov eax, dword [rbp - 4]
nop
lea rsp, [rbp]
pop rbp
ret
Function at 0x10002d330
Capabilities:
Get geographical location

Disassembly:
push rbp
mov rbp, rsp
lea rsp, [rsp - 0x50]
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], r12
mov qword [rbp - 0x10], r13
mov rsi, rcx
mov edi, edx
mov r12d, r8d
mov r13, r9
mov qword [rbp - 8], 0
nop
mov edx, r12d
mov ecx, edi
xor r9d, r9d
xor r8, r8
call sub.kernel32.dll_GetLocaleInfoW
mov ebx, eax
test ebx, ebx
jle 0x10002d3b1
movsxd rdx, ebx
sub rdx, 1
lea rcx, [rbp - 8]
call fcn.100008ed0
cmp ebx, 1
jle 0x10002d3a0
mov r8, qword [rbp - 8]
mov r9d, ebx
mov edx, r12d
mov ecx, edi
call sub.kernel32.dll_GetLocaleInfoW
mov ebx, eax
nop
mov rcx, rsi
mov rdx, qword [rbp - 8]
xor r8d, r8d
call fcn.1000089c0
jmp 0x10002d3bc
mov rcx, rsi
mov rdx, r13
call fcn.1000065a0
nop
mov rcx, rbp
call fcn.10002d310
mov rbx, qword [rbp - 0x30]
mov rdi, qword [rbp - 0x28]
mov rsi, qword [rbp - 0x20]
mov r12, qword [rbp - 0x18]
mov r13, qword [rbp - 0x10]
lea rsp, [rbp]
pop rbp
ret

Function at 0x10002d880
Capabilities:
Get geographical location

Disassembly:
push rbp
mov rbp, rsp
lea rsp, [rsp - 0x60]
mov qword [rbp - 0x28], rbx
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], 0
nop
xor ebx, ebx
nop dword [rax]
add ebx, 1
mov eax, ebx
lea rdx, [0x100065e30]
lea rcx, [rdx + rax*8 - 8]
xor edx, edx
call fcn.1000065a0
mov eax, ebx
lea rdx, [0x100065e70]
mov dword [rdx + rax*4 - 4], 0xffffffff
cmp ebx, 7
jl 0x10002d8a0
call sub.kernel32.dll_GetThreadLocale
mov esi, eax
lea r8, [rbp - 0xc]
mov ecx, esi
mov r9d, 0xb
mov edx, 0x100b
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x10002d954
nop
mov byte [rsp + 0x20], 1
lea rdx, [rbp - 0xc]
xor r9d, r9d
mov r8d, 0xa
lea rcx, [rbp - 0x18]
call fcn.1000070c0
mov rcx, qword [rbp - 0x18]
mov edx, 1
call fcn.100023940
mov ebx, eax
sub eax, 3
cmp eax, 3
jae 0x10002d954
lea rcx, [0x10002d720]
mov r8d, ebx
mov edx, esi
mov r9d, 4
call sub.kernel32.dll_EnumCalendarInfoA
lea rcx, [0x10002d7d0]
mov r8d, ebx
mov edx, esi
mov r9d, 3
call sub.kernel32.dll_EnumCalendarInfoA
nop dword [rax]
nop
mov rcx, rbp
call fcn.10002d860
mov rbx, qword [rbp - 0x28]
mov rsi, qword [rbp - 0x20]
lea rsp, [rbp]
pop rbp
ret
Function at 0x10002dff0
Capabilities:
Check os version

Disassembly:
lea rsp, [rsp - 0xb8]
mov qword [0x100065eb0], 0
mov dword [rsp + 0x20], 0x94
lea rcx, [rsp + 0x20]
call sub.kernel32.dll_GetVersionExA
mov eax, dword [rsp + 0x30]
mov dword [0x100065cf0], eax
mov eax, dword [rsp + 0x24]
mov dword [0x100065d00], eax
mov eax, dword [rsp + 0x28]
mov dword [0x100065d10], eax
mov eax, dword [rsp + 0x2c]
mov dword [0x100065d20], eax
lea rdx, [0x100065d31]
lea rcx, [rsp + 0x34]
mov r8d, pe_nt_image_headers64
call fcn.100001fd0
lea rcx, [rsp + 0x34]
call fcn.100002e30
mov byte [0x100065d30], al
lea rcx, [0x100050408]
call sub.kernel32.dll_GetModuleHandleA
mov qword [0x100065ec0], rax
test rax, rax
je 0x10002e098
mov rcx, qword [0x100065ec0]
lea rdx, [0x100050418]
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065eb0], rax
nop
cmp dword [0x100065d00], 6
jae 0x10002e0ac
mov dword [0x100044060], 0
nop
cmp dword [0x100065d00], 6
jb 0x10002e0c8
cmp dword [0x100065d10], 1
jb 0x10002e0c8
mov dword [0x100044070], 2
nop
lea rsp, [rsp + 0xb8]
ret

Function at 0x100031d30
Capabilities:
Contain obfuscated stackstrings
Get token membership

Disassembly:
push rbp
mov rbp, rsp
lea rsp, [rsp - 0x80]
mov byte [rbp - 4], 0x55
mov dword [rbp - 0x10], 0x55555555
mov dword [rbp - 0xc], 0x55555555
mov dword [rbp - 0x14], 0x55555555
mov qword [rbp - 0x10], 0
nop
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea rax, [rbp - 0x10]
mov qword [rsp + 0x50], rax
lea rcx, [0x100045d30]
mov r9d, 0x220
mov r8d, 0x20
mov edx, 2
call sub.advapi32.dll_AllocateAndInitializeSid
or eax, eax
setne cl
call fcn.100023100
mov dl, al
lea r8, [rbp - 0x14]
mov rdx, qword [rbp - 0x10]
xor ecx, ecx
call sub.advapi32.dll_CheckTokenMembership
test eax, eax
je 0x100031ddd
mov eax, dword [rbp - 0x14]
or eax, eax
setne al
mov byte [rbp - 4], al
jmp 0x100031de1
mov byte [rbp - 4], 0
nop
mov rcx, rbp
call dbg.fin$00000017
mov al, byte [rbp - 4]
nop
lea rsp, [rbp]
pop rbp
ret
Function at 0x100031e20
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rbp
mov rbp, rsp
lea rsp, [rsp - 0x50]
mov byte [rbp - 4], 0x55
mov dword [rbp - 0x10], 0x55555555
mov dword [rbp - 0xc], 0x55555555
mov dword [rbp - 0x14], 0x55555555
mov dword [rbp - 0x18], 0x55555555
mov byte [rbp - 0x1c], 0x55
xor eax, eax
mov ecx, 6
mov edx, eax
call fcn.100023120
test al, al
je 0x100031f12
mov qword [rbp - 0x10], 0
call sub.kernel32.dll_GetCurrentThread
mov rcx, rax
lea r9, [rbp - 0x10]
mov r8d, 0xffffffff
mov edx, 8
call sub.advapi32.dll_OpenThreadToken
or eax, eax
setne al
mov byte [rbp - 0x1c], al
test al, al
jne 0x100031ec0
call sub.kernel32.dll_GetLastError
cmp eax, 0x3f0
jne 0x100031ec0
call sub.kernel32.dll_GetCurrentProcess
mov rcx, rax
lea r8, [rbp - 0x10]
mov edx, 8
call sub.advapi32.dll_OpenProcessToken
or eax, eax
setne al
mov byte [rbp - 0x1c], al
nop dword [rax]
cmp byte [rbp - 0x1c], 0
je 0x100031f0c
nop
mov dword [rbp - 0x14], 0
lea rax, [rbp - 0x14]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
mov r9d, 4
mov edx, 0x14
call sub.advapi32.dll_GetTokenInformation
test eax, eax
je 0x100031efd
cmp dword [rbp - 0x18], 0
setne byte [rbp - 4]
jmp 0x100031f01
mov byte [rbp - 4], 0
nop
mov rcx, rbp
call dbg.fin$0000001B
jmp 0x100031f1a
mov byte [rbp - 4], 0
jmp 0x100031f1a
call dbg.ISADMINISTRATOR
mov byte [rbp - 4], al
mov al, byte [rbp - 4]
nop
lea rsp, [rbp]
pop rbp
ret
Function at 0x100032980
Capabilities:
Link many functions at runtime

Disassembly:
lea rsp, [rsp - 0x28]
mov byte [rsp + 0x20], 0x55
mov byte [rsp + 0x20], 0
cmp dword [0x100065cf0], 2
jne 0x100032aa0
cmp qword [0x100045dd0], 0
jne 0x1000329bc
lea rcx, str.secur32.dll
call sub.kernel32.dll_LoadLibraryA
mov qword [0x100045dd0], rax
nop dword [rax]
cmp qword [0x100045dd0], 0x20
jbe 0x100032aa0
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaFreeReturnBuffer
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065fa0], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaEnumerateLogonSessions
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065fb0], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaGetLogonSessionData
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065fc0], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaCallAuthenticationPackage
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065f50], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaConnectUntrusted
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065f60], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaLookupAuthenticationPackage
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065f70], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaRegisterLogonProcess
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065f80], rax
mov rcx, qword [0x100045dd0]
lea rdx, str.LsaDeregisterLogonProcess
call sub.kernel32.dll_GetProcAddress
mov qword [0x100065f90], rax
mov byte [rsp + 0x20], 1
nop
mov al, byte [rsp + 0x20]
nop
lea rsp, [rsp + 0x28]
ret
Function at 0x100033040
Capabilities:
Contain obfuscated stackstrings
Link many functions at runtime

Disassembly:
push rbp
mov rbp, rsp
lea rsp, [rsp - 0x150]
mov qword [rbp - 0x130], rbx
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x20], 0
nop
mov byte [rbp - 4], 0x55
mov dword [rbp - 0x10], 0x55555555
mov dword [rbp - 0xc], 0x55555555
mov dword [rbp - 0x18], 0x55555555
mov dword [rbp - 0x14], 0x55555555
mov byte [rbp - 4], 0
nop
mov qword [rbp - 0x10], 0
lea rcx, str.dbghelp.dll
call sub.kernel32.dll_LoadLibraryA
mov qword [rbp - 0x10], rax
test rax, rax
jg 0x100033154
lea rcx, [rbp - 0x20]
call fcn.100006520
call sub.kernel32.dll_GetLastError
mov ebx, eax
mov r8d, 0x55
mov edx, 0x100
lea rcx, [rbp - 0x128]
call fcn.1000029a0
mov r9d, 0xff
lea r8, [rbp - 0x128]
mov rdx, 0xffffffffffffffff
mov rcx, rbx
call fcn.1000038e0
xor r8d, r8d
lea rdx, [rbp - 0x128]
lea rcx, [rbp - 0x28]
call fcn.100006f20
xor r8b, r8b
xor edx, edx
lea rcx, [rbp - 0x28]
call fcn.100007e00
mov r8, qword [rbp - 0x28]
xor r9d, r9d
lea rdx, str.could_not_loadlibrary:
lea rcx, [rbp - 0x20]
call fcn.1000066c0
mov r8, qword [rbp - 0x20]
mov edx, 1
lea rcx, [0x10004c448]
call fcn.10002c0d0
mov rcx, rax
lea rdx, [0x1000330aa]
mov r8, rbp
call fcn.100011e50
jmp 0x10003323b
mov rcx, qword [rbp - 0x10]
lea rdx, str.SymLoadModuleEx
call sub.kernel32.dll_GetProcAddress
mov qword [0x1000660e0], rax
mov rcx, qword [rbp - 0x10]
lea rdx, str.SymInitialize
call sub.kernel32.dll_GetProcAddress
mov qword [0x1000660f0], rax
mov rcx, qword [rbp - 0x10]
lea rdx, str.SymSetOptions
call sub.kernel32.dll_GetProcAddress
mov qword [0x100066100], rax
mov rcx, qword [rbp - 0x10]
lea rdx, str.SymFromName
call sub.kernel32.dll_GetProcAddress
mov qword [0x100066110], rax
mov rcx, qword [rbp - 0x10]
lea rdx, str.SymFromAddr
call sub.kernel32.dll_GetProcAddress
mov qword [0x100066120], rax
mov rcx, qword [rbp - 0x10]
lea rdx, str.SymCleanup
call sub.kernel32.dll_GetProcAddress
mov qword [0x100066130], rax
mov byte [rbp - 4], 1
jmp 0x10003323b
nop
mov rcx, rbp
call dbg.fin$00000011
mov al, byte [rbp - 4]
mov rbx, qword [rbp - 0x130]
lea rsp, [rbp]
pop rbp
ret
Function at 0x1400047e4
Capabilities:
Identify system language via api

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x1400128b8]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea r14, str.en_US
mov rsi, rcx
mov qword [rcx], r14
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
mov word [rsp + 0x30], ax
mov ebx, 0x10
mov r9d, ebx
lea rdx, [0x140008110]
lea rax, [0x140004df0]
mov r8d, 0x1b3
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_private_l1_1_0.dll__o_bsearch
xor ebp, ebp
test rax, rax
jne 0x14000485f
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400048e5
cmp dword [rax + 0xc], 0x7c
jne 0x14000486c
cmp word [rax + 8], 0x7f
jne 0x14000484f
mov r8, qword [rax]
or rcx, 0xffffffffffffffff
inc rcx
cmp word [r8 + rcx*2], bp
jne 0x140004873
inc rcx
cmp rcx, 0x7ffffffe
jbe 0x140004890
mov word [rsp + 0x38], bp
jmp 0x1400048d7
lea rax, [rsp + 0x38]
mov r9d, ebp
sub r8, rax
lea rdx, [rsp + 0x38]
lea rax, [rbx - 0x10]
add rax, rcx
je 0x1400048c0
movzx eax, word [r8 + rdx]
test ax, ax
je 0x1400048c0
mov word [rdx], ax
add rdx, 2
sub rbx, 1
jne 0x1400048a0
test rbx, rbx
jne 0x1400048cf
sub rdx, 2
mov r9d, 0x8007007a
mov word [rdx], bp
test r9d, r9d
jns 0x1400048e1
mov ecx, 0x7a
jmp 0x140004854
test ecx, ecx
jne 0x1400048f1
mov rcx, qword [rsp + 0x78]
call fcn.14000494c
jmp 0x14000492a
mov rbx, rbp
mov rdi, rbp
mov rdx, qword [rdi + r14]
lea rcx, [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
test eax, eax
je 0x14000491c
inc rbx
add rdi, 0x30
cmp rdi, 0x750
jb 0x1400048f7
jmp 0x14000492a
lea rax, [rbx + rbx*2]
shl rax, 4
add rax, r14
mov qword [rsi], rax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400050e0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x140005104
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140012e60], eax
call fcn.1400056f0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140012e60], 0
jne case.default.0x14000515a
mov ecx, 1
call fcn.1400056f0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
jge 0x14001ad69
invalid
invalid
Function at 0x140001320
Capabilities:
Query environment variable
Terminate process
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rsi
push rdi
mov eax, 0x1020
call fcn.140156570
sub rsp, rax
mov rdx, rcx
lea rbx, [0x1401bcf40]
mov rcx, rbx
lea r8, [rsp + 0x1048]
call fcn.140002a80
cmp dword [0x1401b9254], 0
mov esi, eax
mov edi, 1
mov byte [rsp + 0x20], 0xa
je 0x140001380
lea rcx, [rsp + 0x21]
call fcn.140002140
lea edi, [rax + 1]
mov r8, qword [section..data]
lea rax, [rsp + 0x20]
movsxd rcx, edi
lea rdx, str._s_Fatal:
add rcx, rax
call fcn.140002a20
add edi, eax
lea rdx, [rsp + 0x20]
movsxd rcx, edi
sub rcx, rbx
add rdx, rcx
nop
movzx eax, byte [rbx]
mov byte [rdx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x1400013b0
mov ecx, dword [0x140175008]
lea rdx, [rsp + 0x20]
add edi, esi
mov eax, 2
test ecx, ecx
mov r8d, edi
cmovle ecx, eax
mov dword [0x140175008], ecx
call fcn.140002a00
mov r9, qword [0x1401b9240]
test r9, r9
je 0x140001418
movsxd r8, edi
lea rcx, [rsp + 0x20]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp dword [0x1401b9260], 0
jle 0x140001418
mov rcx, qword [0x1401b9240]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [0x1401b92b8]
test rax, rax
je 0x140001426
call rax
lea rcx, str.PVIEW_FATAL_PROMPT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001445
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call fcn.1400024c0
lea rcx, str.PVIEW_FATAL_SPIN
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001459
jmp 0x140001457
call fcn.140001940
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
Function at 0x140001950
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x440
mov rax, qword [0x1401b9240]
xor edi, edi
mov qword [rsp + 0x458], rsi
mov esi, edx
mov rbx, rcx
test rax, rax
je 0x140001990
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, edi
mov qword [0x1401b9240], rax
mov rcx, qword [0x1401b9248]
test rcx, rcx
je 0x1400019b0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [0x1401b9240]
mov qword [0x1401b9248], rdi
mov r14, 0xffffffffffffffff
test rbx, rbx
je 0x140001a75
movzx ecx, byte [rbx]
lea rax, [rbx + 1]
cmp cl, 0x3e
mov qword [rsp + 0x450], rbp
mov ebp, esi
cmovne rax, rbx
or ebp, 1
cmp cl, 0x3e
mov rbx, rax
cmovne ebp, esi
test bpl, 2
je 0x140001a4a
lea rcx, [rsp + 0x20]
nop
movzx eax, byte [rbx]
lea rbx, [rbx + 1]
mov byte [rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400019f0
lea rcx, [rsp + 0x20]
mov rax, r14
nop dword [rax]
inc rax
cmp byte [rcx + rax], dil
jne 0x140001a10
lea rsi, [rsp + 0x20]
mov ebx, edi
add rsi, rax
mov r8d, ebx
lea rdx, str.__d.log
mov rcx, rsi
call fcn.140002a20
lea rcx, [rsp + 0x20]
inc ebx
call fcn.14001ceb0
test eax, eax
jne 0x140001a23
lea rbx, [rsp + 0x20]
test bpl, 1
lea rdx, [0x140175144]
mov rbp, qword [rsp + 0x450]
mov rcx, rbx
jne 0x140001a69
lea rdx, [0x1401751b4]
call fcn.14001ccc0
mov qword [0x1401b9240], rax
mov rsi, qword [rsp + 0x458]
test rax, rax
jne 0x140001ab0
mov ecx, dword [0x140175008]
cmp ecx, r14d
cmove ecx, edi
mov dword [0x140175008], ecx
test rbx, rbx
je 0x140001b18
mov r8, rbx
lea rdx, str.Failed_to_open_log_file___s__n
lea ecx, [rax + 1]
call fcn.140002870
mov eax, r14d
jmp 0x140001b1a
mov eax, dword [0x140175008]
test eax, eax
cmove eax, r14d
mov dword [0x140175008], eax
test rbx, rbx
je 0x140001ad8
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rdi, rax
test rax, rax
je 0x140001b30
cmp dword [0x1401b9260], 0
mov qword [0x1401b9248], rdi
jne 0x140001b18
lea rcx, str.PVIEW_FLUSH_LOG
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001b0e
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [0x1401b9260], r14d
test eax, eax
je 0x140001b18
mov dword [0x1401b9260], 1
xor eax, eax
lea r11, [rsp + 0x440]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
lea rcx, str.Strdup_failure___Enough_memory__n
call fcn.140001320
int3
Function at 0x140001fb0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push r15
mov eax, 0x1060
call fcn.140156570
sub rsp, rax
cmp dword [0x140175008], 0
mov r15, rcx
je 0x140002129
mov qword [rsp + 0x1058], rbx
mov qword [rsp + 0x1050], rbp
mov qword [rsp + 0x1048], rsi
movsxd rsi, dword [0x1401b9268]
mov qword [rsp + 0x1040], rdi
xor edi, edi
mov qword [rsp + 0x1038], r12
lea r12, [rsp + 0x1078]
mov qword [rsp + 0x1030], r14
test esi, esi
je 0x140002040
mov r8, rsi
mov dword [0x1401b9268], edi
lea edx, [rdi + 8]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
jmp 0x140002042
mov esi, edi
cmp dword [0x1401b9258], 0
movsxd r14, esi
je 0x140002061
mov dword [0x1401b9258], edi
mov ebp, 1
mov byte [rsp + r14 + 0x30], 0xa
jmp 0x140002063
mov ebp, edi
mov eax, ebp
lea rbx, [rsp + 0x30]
add rax, r14
add rbx, rax
call fcn.140001240
mov qword [rsp + 0x28], r12
mov r9, r15
mov qword [rsp + 0x20], rdi
mov rdx, rbx
mov rdi, 0xffffffffffffffff
mov rcx, qword [rax]
mov r8, rdi
or rcx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsprintf]
mov ecx, dword [0x140175008]
test eax, eax
mov r12, qword [rsp + 0x1038]
mov rbx, qword [rsp + 0x1058]
cmovs eax, edi
mov rdi, qword [rsp + 0x1040]
add ebp, eax
test ecx, ecx
jle 0x1400020d9
lea r8d, [rsi + rbp]
test r8d, r8d
jle 0x1400020d9
lea rdx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
mov r9, qword [0x1401b9240]
mov rsi, qword [rsp + 0x1048]
test r9, r9
je 0x140002119
lea rcx, [rsp + 0x30]
movsxd r8, ebp
add rcx, r14
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp dword [0x1401b9260], 0
jle 0x140002119
mov rcx, qword [0x1401b9240]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rbp, qword [rsp + 0x1050]
mov r14, qword [rsp + 0x1030]
add rsp, 0x1060
pop r15
ret
Function at 0x140002310
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push r15
mov eax, 0x1060
call fcn.140156570
sub rsp, rax
cmp dword [0x140175008], 0
mov r15, rcx
je 0x1400024b0
mov qword [rsp + 0x1058], rbx
mov qword [rsp + 0x1050], rbp
mov qword [rsp + 0x1048], rsi
xor esi, esi
mov qword [rsp + 0x1040], rdi
mov qword [rsp + 0x1038], r12
lea r12, [rsp + 0x1078]
mov qword [rsp + 0x1030], r14
movsxd r14, dword [0x1401b9268]
test r14d, r14d
je 0x1400023a1
mov r8, r14
mov dword [0x1401b9268], esi
lea edx, [rsi + 8]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
jmp 0x1400023a4
mov r14d, esi
cmp dword [0x1401b9258], 0
movsxd rbp, r14d
je 0x1400023c2
mov dword [0x1401b9258], esi
mov edi, 1
mov byte [rsp + rbp + 0x30], 0xa
jmp 0x1400023c4
mov edi, esi
cmp dword [0x1401b9254], 0
je 0x1400023e9
mov eax, edi
lea rcx, [rsp + 0x30]
add rax, rbp
add rcx, rax
call fcn.140002140
mov r15, qword [rsp + 0x1070]
add edi, eax
movsxd rax, edi
lea rbx, [rsp + 0x30]
add rax, rbp
add rbx, rax
call fcn.140001240
mov qword [rsp + 0x28], r12
mov r9, r15
mov qword [rsp + 0x20], rsi
mov rdx, rbx
mov rsi, 0xffffffffffffffff
mov rcx, qword [rax]
mov r8, rsi
or rcx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsprintf]
mov ecx, dword [0x140175008]
test eax, eax
mov r12, qword [rsp + 0x1038]
mov rbx, qword [rsp + 0x1058]
cmovs eax, esi
mov rsi, qword [rsp + 0x1048]
add edi, eax
test ecx, ecx
jle 0x140002460
lea r8d, [r14 + rdi]
test r8d, r8d
jle 0x140002460
lea rdx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
mov r9, qword [0x1401b9240]
mov r14, qword [rsp + 0x1030]
test r9, r9
je 0x1400024a0
lea rcx, [rsp + 0x30]
movsxd r8, edi
add rcx, rbp
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp dword [0x1401b9260], 0
jle 0x1400024a0
mov rcx, qword [0x1401b9240]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rbp, qword [rsp + 0x1050]
mov rdi, qword [rsp + 0x1040]
add rsp, 0x1060
pop r15
ret

Function at 0x140002780
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
mov rcx, qword [0x1401b9248]
test rcx, rcx
je 0x1400027e1
cmp qword [0x1401b9240], 0
je 0x1400027e1
mov qword [rsp + 0x20], rbx
test rcx, rcx
jne 0x1400027d1
xor ebx, ebx
mov edx, 0x5f
mov rcx, rbx
call fcn.1401570ce
test rax, rax
je 0x1400027bb
mov byte [rax], 0
mov edx, 2
mov rcx, rbx
mov rbx, qword [rsp + 0x20]
add rsp, 0x28
jmp fcn.140001950
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rbx, rax
test rax, rax
je 0x1400027fc
jmp 0x1400027a6
lea rdx, str.Failed_to_reset_log_file__n
mov ecx, 1
call fcn.140002870
mov eax, 0xffffffff
add rsp, 0x28
ret
lea rcx, str.Strdup_failure___Enough_memory__n
call fcn.140001320
int3