Function at 0x180078630
Capabilities:
Get common file path
Query environment variable

Disassembly:
push rbp
push r14
lea rbp, [rsp - 0x5c8]
sub rsp, 0x6c8
mov rax, qword [0x1800e3040]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
cmp qword [rcx + 8], 0
mov r14, rcx
jne 0x180078670
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180078b94
cmp dword [rcx + 0x1c], 0
je 0x180078680
mov eax, 1
jmp 0x180078b94
mov qword [rsp + 0x6e8], rbx
mov qword [rsp + 0x6f8], rdi
mov qword [rsp + 0x6c0], r12
xor r12d, r12d
test byte [rcx + 0x28], 0x10
mov ebx, r12d
je 0x180078a09
mov ecx, 0x1000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x1800786cb
lea ecx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180078b7c
mov r8, qword [r14 + 0x20]
mov byte [rax], r12b
test r8, r8
je 0x1800786fa
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf728]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea rdx, [rbp + 0x1a0]
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x180078756
lea r8, [rbp + 0x1a0]
mov byte [rbp + 0x59f], r12b
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov r8d, 0x400
lea rdx, [rbp + 0x1a0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x180078828
mov rdx, 0xffffffffffffffff
mov byte [rbp + 0x59f], r12b
mov rax, rdx
lea rcx, [rbp + 0x1a0]
nop dword [rax + rax]
cmp byte [rcx + rax + 1], r12b
lea rax, [rax + 1]
jne 0x180078790
lea rcx, [rbp + rax + 0x19f]
lea rax, [rbp + 0x1a0]
cmp rcx, rax
jb 0x1800787e3
movabs r8, 0x200000000801
nop dword [rax]
movzx eax, byte [rcx]
sub al, 0x2f
cmp al, 0x2d
ja 0x1800787cf
bt r8, rax
jb 0x1800787e0
dec rcx
lea rax, [rbp + 0x1a0]
cmp rcx, rax
jae 0x1800787c0
jmp 0x1800787e3
mov byte [rcx], r12b
lea rax, [rbp + 0x1a0]
nop word [rax + rax]
inc rdx
cmp byte [rax + rdx], r12b
jne 0x1800787f0
test rdx, rdx
je 0x180078828
lea r8, [rbp + 0x1a0]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov r8d, 0x400
lea rdx, [rbp + 0x1a0]
lea rcx, str._NT_SYMBOL_PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x180078877
lea r8, [rbp + 0x1a0]
mov byte [rbp + 0x59f], r12b
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov r8d, 0x400
lea rdx, [rbp + 0x1a0]
lea rcx, str._NT_ALTERNATE_SYMBOL_PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x1800788c6
lea r8, [rbp + 0x1a0]
mov byte [rbp + 0x59f], r12b
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov r8d, 0x400
lea rdx, [rbp + 0x1a0]
lea rcx, str.SYSTEMROOT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x180078958
lea r8, [rbp + 0x1a0]
mov byte [rbp + 0x59f], r12b
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, str._system32
mov edx, 0x400
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [rbp + 0x1a0]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [0x1800cf72c]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
test byte [r14 + 0x28], 0x20
je 0x180078a09
mov r8d, 0x400
lea rdx, [rbp + 0x1a0]
lea rcx, str.SYSTEMDRIVE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edx, 0x1000
mov rcx, rbx
test eax, eax
je 0x1800789ec
lea r8, str.SRV
mov byte [rbp + 0x59f], r12b
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, [rbp + 0x1a0]
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, str.websymbols
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea r8, str.https:__msdl.microsoft.com_download_symbols_
mov edx, 0x1000
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov rcx, qword [r14 + 8]
mov rdx, rbx
call fcn.180077770
mov edi, eax
jmp 0x180078a1c
lea r8, str.SRVc:websymbolshttps:__msdl.microsoft.com_download_symbols_
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
mov rcx, qword [r14 + 8]
mov rdx, rbx
call fcn.180077770
mov edi, eax
jmp 0x180078a1c
mov rcx, qword [r14 + 8]
mov rdx, rbx
call fcn.180077770
mov edi, eax
test rbx, rbx
je 0x180078a25
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test edi, edi
jne 0x180078a51
mov rax, qword [r14]
lea rdx, str.Error_while_initializing_dbghelp.dll
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call qword [rax + 0x20]
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180078b7c
mov rax, qword [r14 + 8]
mov rdi, r12
mov qword [rsp + 0x30], rax
mov eax, dword [r14 + 0x18]
mov dword [rsp + 0x40], eax
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0x6f0], rsi
mov rsi, r12
mov qword [rsp + 0x38], rax
lea rax, str.kernel32.dll
mov qword [rsp + 0x6b8], r13
mov r13, r12
mov qword [rsp + 0x48], rax
lea rax, str.tlhelp32.dll
mov qword [rsp + 0x6b0], r15
mov r15, r12
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x60], 0x238
nop
mov rcx, qword [rsp + rdi*8 + 0x48]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x180078b17
lea rdx, [0x1800cf388]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.Module32First
mov rcx, rbx
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.Module32Next
mov rcx, rbx
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
test r13, r13
je 0x180078b0b
test r15, r15
je 0x180078b0b
test rax, rax
jne 0x180078b25
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rbx, r12
inc rdi
cmp rdi, 2
jb 0x180078ab0
test rbx, rbx
je 0x180078b43
mov edx, dword [rsp + 0x40]
mov ecx, 8
call r13
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x180078bae
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov r13, qword [rsp + 0x38]
mov r15, qword [rsp + 0x30]
mov rdx, r13
mov rcx, r15
call fcn.180077c90
test eax, eax
je 0x180078b64
mov dword [r14 + 0x1c], 1
mov r15, qword [rsp + 0x6b0]
mov r13, qword [rsp + 0x6b8]
mov rsi, qword [rsp + 0x6f0]
mov rdi, qword [rsp + 0x6f8]
mov rbx, qword [rsp + 0x6e8]
mov r12, qword [rsp + 0x6c0]
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.1800903f0
add rsp, 0x6c8
pop r14
pop rbp
ret
lea rdx, [rsp + 0x60]
mov rcx, rdi
call r15
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
test eax, eax
je 0x180078c08
nop word [rax + rax]
mov eax, dword [rbp - 0x80]
lea r9, [rbp - 0x70]
mov dword [rsp + 0x28], eax
lea r8, [rbp + 0x90]
mov rax, qword [rsp + 0x78]
mov rdx, r13
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.180077f40
lea rdx, [rsp + 0x60]
mov rcx, rdi
inc r12d
call rsi
test eax, eax
jne 0x180078bd0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test r12d, r12d
jle 0x180078b4d
mov eax, 1
jmp 0x180078b5c