Function at 0x140002058
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 [0x140047030]
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.1400367f6
mov edi, 0xc0000004
jmp 0x1400020e9
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.1400367f6
cmp eax, edi
je 0x1400020ae
test eax, eax
js 0x1400024fc
xor ebx, ebx
mov dword [rbp - 0x55], ebx
cmp dword [r12], ebx
jbe 0x1400024fc
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.140002664
nop
lea rcx, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae 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 0x1400024b5
lea rdx, [r13 + 0x30]
add rdx, r12
lea rcx, [rbp - 0x11]
call fcn.140002664
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.140002664
mov rdi, rax
mov rcx, qword [rax + 0x10]
mov rax, qword [rax + 0x18]
sub rax, rcx
cmp rax, r14
jb 0x1400021b2
lea rax, [rcx + 1]
mov qword [rdi + 0x10], rax
mov rax, rdi
cmp qword [rdi + 0x18], 0x10
jb 0x1400021aa
mov rax, qword [rdi]
mov word [rax + rcx], 0x5c
jmp 0x1400021c5
mov qword [rsp + 0x20], r14
mov rdx, r14
mov rcx, rdi
call fcn.140002960
mov rdi, rax
lea rsi, [rbp - 0x11]
mov rcx, qword [rbp + 7]
mov qword [rbp - 0x51], rcx
cmp rcx, 0x10
setae r8b
mov byte [rbp - 0x59], r8b
cmovae rsi, qword [rbp - 0x11]
mov r15, qword [rbp - 1]
cmp r15, 0xc
jb 0x14000223c
lea r14, [r15 + rsi]
lea r8, [r14 - 0xb]
sub r8, rsi
mov rcx, rsi
jmp 0x140002222
mov r8d, 0xc
lea rdx, str.SystemRoot_
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x14000228e
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 0x1400021fc
mov rcx, qword [rbp - 0x51]
mov r8b, byte [rbp - 0x59]
or rbx, 0xffffffffffffffff
mov rsi, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 0x10
jb 0x14000224e
mov rdi, qword [rdi]
cmp r15, rbx
jb 0x140002602
mov rax, r15
sub rax, rbx
mov r14d, 0xc
cmp rax, r14
cmovb r14, rax
cmp r14, rsi
jne 0x14000229b
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 0x140002398
sub rbx, rsi
mov rcx, qword [rbp - 0x51]
mov r8b, byte [rbp - 0x59]
jmp 0x140002240
mov rdx, r15
sub rdx, r14
sub rdx, rbx
inc rdx
mov qword [rbp - 0x51], rdx
cmp rsi, r14
jae 0x1400022ed
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 0x140002398
mov r13, rsi
sub r13, r14
sub rcx, r15
cmp r13, rcx
lea rcx, [rbp - 0x11]
ja 0x14000237a
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 0x14000233e
lea rax, [rcx + r15]
cmp rdi, rax
ja 0x14000233e
cmp r9, rdi
ja 0x140002336
xor ebx, ebx
jmp 0x140002341
mov rbx, r9
sub rbx, rdi
jmp 0x140002341
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 0x140002394
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r14
mov r9, rbx
mov rdx, r13
call fcn.140002798
mov r13, qword [rbp - 0x49]
mov rdx, qword [rbp - 0x21]
mov r15d, 0x1000
cmp rdx, 0x10
jb 0x1400023d5
inc rdx
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, r15
jb 0x1400023d0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000253c
call fcn.140036b7c
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 0x10
cmovae 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 0x14000256c
movsxd rax, dword [rbx + 0x3c]
cmp dword [rax + rbx], 0x4550
jne 0x14000256c
mov ecx, dword [rax + rbx + 0x88]
test ecx, ecx
je 0x14000256c
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 0x14000247b
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 0x140002466
add rax, r14
test r9d, r9d
jne 0x140002450
test r10d, r10d
je 0x140002543
add r8d, r14d
add rdx, 4
cmp r8d, r11d
jb 0x140002444
mov rdx, qword [rbp + 7]
cmp rdx, 0x10
jb 0x1400024b2
inc rdx
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, r15
jb 0x1400024ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000259c
call fcn.140036b7c
mov ebx, dword [rbp - 0x55]
mov rdx, qword [rbp + 0x27]
cmp rdx, 0x10
jb 0x1400024ec
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, r15
jb 0x1400024e7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400025fb
call fcn.140036b7c
add ebx, r14d
mov dword [rbp - 0x55], ebx
cmp ebx, dword [r12]
jb 0x14000210e
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.1400368b0
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 0x14000256e
xor edi, edi
mov rdx, qword [rbp + 7]
cmp rdx, 0x10
jb 0x1400025a8
inc rdx
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, r15
jb 0x1400025a3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400025a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140036b7c
and qword [rbp - 1], 0
mov qword [rbp + 7], 0xf
mov byte [rbp - 0x11], 0
mov rdx, qword [rbp + 0x27]
cmp rdx, 0x10
jb 0x1400025f3
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, r15
jb 0x1400025ee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400025ee
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140036b7c
mov rax, rdi
jmp 0x14000250f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.140002784
int3