Function at 0x140002038
Capabilities:
Parse pe header
Query environment variable
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xd0
mov rax, qword [0x140047040]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov qword [rbp - 0x41], r8
xor r12d, r12d
and dword [rbp - 0x19], r12d
lea r9, [rbp - 0x19]
xor r8d, r8d
xor edx, edx
lea ebx, [rdx + 0xb]
mov ecx, ebx
call fcn.140037146
mov edi, 0xc0000004
jmp 0x1400020c9
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp - 0x19]
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
lea r9, [rbp - 0x19]
mov r8d, dword [rbp - 0x19]
mov rdx, rax
mov ecx, ebx
call fcn.140037146
cmp eax, edi
je 0x14000208e
test eax, eax
js 0x1400024dc
xor ebx, ebx
mov dword [rbp - 0x55], ebx
cmp dword [r12], ebx
jbe 0x1400024dc
lea r14d, [rbx + 1]
mov r15d, 0x1000
mov eax, ebx
imul r13, rax, 0x128
mov qword [rbp - 0x49], r13
movzx edx, word [r12 + r13 + 0x2e]
add rdx, 0x30
add rdx, r13
add rdx, r12
lea rcx, [rbp + 0xf]
call fcn.140002644
nop
lea rcx, [rbp + 0xf]
cmp qword [rbp + 0x27], 0xf
cmova rcx, qword [rbp + 0xf]
lea rdx, str.ntoskrnl.exe
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x140002495
lea rdx, [r13 + 0x30]
add rdx, r12
lea rcx, [rbp - 0x11]
call fcn.140002644
nop
lea rcx, str.SYSTEMROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
lea rcx, [rbp - 0x39]
call fcn.140002644
mov rdi, rax
mov rcx, qword [rax + 0x10]
mov rax, qword [rax + 0x18]
sub rax, rcx
cmp rax, r14
jb 0x140002192
lea rax, [rcx + 1]
mov qword [rdi + 0x10], rax
mov rax, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x14000218a
mov rax, qword [rdi]
mov word [rax + rcx], 0x5c
jmp 0x1400021a5
mov qword [rsp + 0x20], r14
mov rdx, r14
mov rcx, rdi
call fcn.140002940
mov rdi, rax
lea rsi, [rbp - 0x11]
mov rcx, qword [rbp + 7]
mov qword [rbp - 0x51], rcx
cmp rcx, 0xf
seta r8b
mov byte [rbp - 0x59], r8b
cmova rsi, qword [rbp - 0x11]
mov r15, qword [rbp - 1]
cmp r15, 0xc
jb 0x14000221c
lea r14, [r15 + rsi]
lea r8, [r14 - 0xb]
sub r8, rsi
mov rcx, rsi
jmp 0x140002202
mov r8d, 0xc
lea rdx, str.SystemRoot_
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x14000226e
inc rbx
lea r8, [r14 - 0xb]
sub r8, rbx
mov rcx, rbx
mov edx, 0x5c
call sub.VCRUNTIME140.dll_memchr
test rax, rax
mov rbx, rax
jne 0x1400021dc
mov rcx, qword [rbp - 0x51]
mov r8b, byte [rbp - 0x59]
or rbx, 0xffffffffffffffff
mov rsi, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 0xf
jbe 0x14000222e
mov rdi, qword [rdi]
cmp r15, rbx
jb 0x1400025e2
mov rax, r15
sub rax, rbx
mov r14d, 0xc
cmp rax, r14
cmovb r14, rax
cmp r14, rsi
jne 0x14000227b
lea rcx, [rbp - 0x11]
test r8b, r8b
cmovne rcx, qword [rbp - 0x11]
add rcx, rbx
mov r8, rsi
mov rdx, rdi
call sub.VCRUNTIME140.dll_memmove
jmp 0x140002378
sub rbx, rsi
mov rcx, qword [rbp - 0x51]
mov r8b, byte [rbp - 0x59]
jmp 0x140002220
mov rdx, r15
sub rdx, r14
sub rdx, rbx
inc rdx
mov qword [rbp - 0x51], rdx
cmp rsi, r14
jae 0x1400022cd
lea rax, [rbp - 0x11]
test r8b, r8b
cmovne rax, qword [rbp - 0x11]
add rbx, rax
mov r8, rsi
mov rdx, rdi
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
lea rdx, [rbx + r14]
lea rcx, [rsi + rbx]
mov r8, qword [rbp - 0x51]
call sub.VCRUNTIME140.dll_memmove
sub rsi, r14
add rsi, r15
mov qword [rbp - 1], rsi
jmp 0x140002378
mov r13, rsi
sub r13, r14
sub rcx, r15
cmp r13, rcx
lea rcx, [rbp - 0x11]
ja 0x14000235a
lea rax, [r15 + r13]
mov qword [rbp - 1], rax
test r8b, r8b
cmovne rcx, qword [rbp - 0x11]
lea r8, [rcx + rbx]
mov qword [rbp - 0x51], r8
lea r9, [r8 + r14]
lea rax, [rsi + rdi]
cmp rax, r8
jbe 0x14000231e
lea rax, [rcx + r15]
cmp rdi, rax
ja 0x14000231e
cmp r9, rdi
ja 0x140002316
xor ebx, ebx
jmp 0x140002321
mov rbx, r9
sub rbx, rdi
jmp 0x140002321
mov rbx, rsi
lea rcx, [r9 + r13]
mov r8, rdx
mov rdx, r9
call sub.VCRUNTIME140.dll_memmove
mov r8, rbx
mov rdx, rdi
mov r14, qword [rbp - 0x51]
mov rcx, r14
call sub.VCRUNTIME140.dll_memmove
sub rsi, rbx
lea rdx, [rbx + r13]
add rdx, rdi
lea rcx, [rbx + r14]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140002374
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r14
mov r9, rbx
mov rdx, r13
call fcn.140002778
mov r13, qword [rbp - 0x49]
mov rdx, qword [rbp - 0x21]
mov r15d, 0x1000
cmp rdx, 0xf
jbe 0x1400023b5
inc rdx
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, r15
jb 0x1400023b0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000251c
call fcn.140037348
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 0xf
cmova rcx, qword [rbp - 0x11]
mov r14d, 1
mov r8d, r14d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov rbx, rax
mov eax, 0x5a4d
cmp word [rbx], ax
jne 0x14000254c
movsxd rax, dword [rbx + 0x3c]
cmp dword [rax + rbx], 0x4550
jne 0x14000254c
mov ecx, dword [rax + rbx + 0x88]
test ecx, ecx
je 0x14000254c
mov r11d, dword [rcx + rbx + 0x1c]
lea rdi, [rbx + r11]
mov edx, dword [rcx + rbx + 0x20]
add rdx, rbx
mov esi, dword [rcx + rbx + 0x24]
add rsi, rbx
xor r8d, r8d
test r11d, r11d
je 0x14000245b
mov ecx, dword [rdx]
add rcx, rbx
mov rax, qword [rbp - 0x41]
sub rcx, rax
movzx r10d, byte [rax]
movzx r9d, byte [rax + rcx]
sub r10d, r9d
jne 0x140002446
add rax, r14
test r9d, r9d
jne 0x140002430
test r10d, r10d
je 0x140002523
add r8d, r14d
add rdx, 4
cmp r8d, r11d
jb 0x140002424
mov rdx, qword [rbp + 7]
cmp rdx, 0xf
jbe 0x140002492
inc rdx
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, r15
jb 0x14000248d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000257c
call fcn.140037348
mov ebx, dword [rbp - 0x55]
mov rdx, qword [rbp + 0x27]
cmp rdx, 0xf
jbe 0x1400024cc
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, r15
jb 0x1400024c7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400025db
call fcn.140037348
add ebx, r14d
mov dword [rbp - 0x55], ebx
cmp ebx, dword [r12]
jb 0x1400020ee
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140037200
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
movzx ecx, word [rsi + r8*2]
mov edi, dword [rdi + rcx*4]
add rdi, qword [r12 + r13 + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x14000254e
xor edi, edi
mov rdx, qword [rbp + 7]
cmp rdx, 0xf
jbe 0x140002588
inc rdx
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, r15
jb 0x140002583
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002583
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140037348
and qword [rbp - 1], 0
mov qword [rbp + 7], 0xf
mov byte [rbp - 0x11], 0
mov rdx, qword [rbp + 0x27]
cmp rdx, 0xf
jbe 0x1400025d3
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, r15
jb 0x1400025ce
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400025ce
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140037348
mov rax, rdi
jmp 0x1400024ef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.140002764
int3