Function at 0x1400173e0
Capabilities:
Access peb ldr_data
Allocate or change rwx memory
Get common file path
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
push rsi
sub rsp, 0x330
lea rax, [rsp + 0x220]
mov qword [rsp + 0x328], rcx
mov rcx, qword [rsp + 0x328]
mov qword [rsp + 0x88], rcx
mov rcx, rax
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [rsp + 0x21c], 0
movsxd rax, dword [rsp + 0x21c]
mov rcx, qword [rsp + 0x88]
mov qword [rsp + 0x80], rax
call fcn.140005f60
mov rcx, qword [rsp + 0x80]
cmp rcx, rax
jae 0x140017ad3
mov qword [rsp + 0x210], 0
mov rax, qword gs:[0x60]
mov qword [rsp + 0x208], rax
mov rax, qword [rsp + 0x208]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x200], rax
mov qword [rsp + 0x1f8], 0
mov qword [rsp + 0x1f0], 0
mov rax, qword [rsp + 0x200]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x1e8], rax
mov rax, qword [rsp + 0x1e8]
cmp qword [rax + 0x30], 0
je 0x1400176a0
mov rax, qword [rsp + 0x1e8]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x1f0], rax
mov rax, qword [rsp + 0x1f0]
mov qword [rsp + 0x1e0], rax
mov rax, qword [rsp + 0x1f0]
mov rcx, qword [rsp + 0x1e0]
movsxd rcx, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp + 0x1d8], rax
mov rax, qword [rsp + 0x1d8]
add rax, 0x18
add rax, 0x70
mov qword [rsp + 0x1d0], rax
mov rax, qword [rsp + 0x1d0]
mov edx, dword [rax]
mov dword [rsp + 0x1cc], edx
cmp dword [rsp + 0x1cc], 0
jne 0x140017542
jmp 0x140017688
mov rax, qword [rsp + 0x1f0]
mov ecx, dword [rsp + 0x1cc]
mov edx, ecx
add rax, rdx
mov qword [rsp + 0x1f8], rax
mov rax, qword [rsp + 0x1f0]
mov rdx, qword [rsp + 0x1f8]
mov ecx, dword [rdx + 0xc]
mov edx, ecx
add rax, rdx
mov qword [rsp + 0x1c0], rax
mov rdx, qword [rsp + 0x1c0]
lea rcx, [rsp + 0x1a0]
call fcn.140006090
lea rcx, [rsp + 0x1a0]
lea rdx, [rsp + 0x190]
mov qword [rsp + 0x78], rax
call fcn.140005b00
lea rcx, [rsp + 0x1a0]
lea rdx, [rsp + 0x188]
call fcn.140005a80
lea rcx, [rsp + 0x1a0]
lea rdx, [rsp + 0x180]
call fcn.140005b00
mov rdx, qword [rsp + 0x180]
mov r8, qword [rsp + 0x188]
mov r9, qword [rsp + 0x190]
mov r10b, byte [rsp + 0x198]
lea rcx, [rsp + 0x178]
mov byte [rsp + 0x20], r10b
call fcn.140017b30
movsxd rdx, dword [rsp + 0x21c]
mov rcx, qword [rsp + 0x88]
call fcn.140005fc0
lea rcx, [rsp + 0x1a0]
mov rdx, rax
call fcn.140013970
test al, 1
jne 0x14001763b
jmp 0x14001765b
mov rax, qword [rsp + 0x1f0]
mov qword [rsp + 0x210], rax
mov dword [rsp + 0x174], 5
jmp 0x140017666
mov dword [rsp + 0x174], 7
lea rcx, [rsp + 0x1a0]
call fcn.140001770
mov eax, dword [rsp + 0x174]
sub eax, 5
je 0x1400176a0
jmp 0x140017688
mov rax, qword [rsp + 0x1e8]
mov rax, qword [rax]
mov qword [rsp + 0x1e8], rax
jmp 0x1400174ac
cmp qword [rsp + 0x210], 0
jne 0x1400176b4
jmp 0x140017abd
movsxd rdx, dword [rsp + 0x21c]
mov rcx, qword [rsp + 0x88]
call fcn.140005fc0
lea rcx, [rsp + 0x110]
lea rdx, [0x14011b35c]
mov r8d, 0x21
mov qword [rsp + 0x70], rax
call fcn.14002f4b0
lea rdx, [rsp + 0x220]
lea rcx, [rsp + 0xf0]
call fcn.140006090
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0xf0]
lea r8, [rsp + 0x110]
mov qword [rsp + 0x68], rax
call fcn.140013d00
lea rcx, [rsp + 0x150]
lea rdx, [rsp + 0x130]
mov r8, qword [rsp + 0x70]
call fcn.140013d50
lea rcx, [rsp + 0x130]
call fcn.140001770
lea rcx, [rsp + 0xf0]
call fcn.140001770
lea rcx, [rsp + 0x110]
call fcn.140001770
lea rcx, [rsp + 0x150]
call fcn.1400073b0
xor r9d, r9d
xor r10d, r10d
mov rcx, rax
mov edx, 0x80000000
mov r8d, 1
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x64], r10d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
xor edx, edx
xor r9d, r9d
mov qword [rsp + 0xe8], rax
mov rcx, qword [rsp + 0xe8]
mov r8d, 0x1000002
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
xor r8d, r8d
xor r9d, r9d
mov ecx, r9d
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x58], rcx
mov rcx, rax
mov edx, 4
mov dword [rsp + 0x54], r8d
mov r9d, dword [rsp + 0x54]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0xd8], rax
cmp qword [rsp + 0xd8], 0
jne 0x14001783d
mov dword [rsp + 0x174], 4
jmp 0x140017a92
mov rax, qword [rsp + 0x210]
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0x210]
mov rcx, qword [rsp + 0xd0]
movsxd rcx, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp + 0xc8], rax
mov word [rsp + 0xc6], 0
movzx eax, word [rsp + 0xc6]
mov rcx, qword [rsp + 0xc8]
movzx edx, word [rcx + 6]
cmp eax, edx
jge 0x140017a55
xor eax, eax
mov ecx, eax
add rcx, 0x18
movsxd rdx, ecx
mov r8, qword [rsp + 0xc8]
add r8, rdx
mov rdx, qword [rsp + 0xc8]
movzx eax, word [rdx + 0x14]
mov edx, eax
add r8, rdx
movzx eax, word [rsp + 0xc6]
mov edx, eax
imul rdx, rdx, 0x28
add r8, rdx
mov qword [rsp + 0xb8], r8
lea rcx, [rsp + 0x98]
lea rdx, [0x14011b37e]
mov r8d, 0x25
call fcn.14002f4b0
lea rcx, [rsp + 0x98]
call fcn.1400073b0
mov rcx, qword [rsp + 0xb8]
mov rdx, rax
call fcn.1400e23e0
cmp eax, 0
setne r9b
xor r9b, 0xff
lea rcx, [rsp + 0x98]
mov byte [rsp + 0x53], r9b
call fcn.140001770
mov r9b, byte [rsp + 0x53]
test r9b, 1
jne 0x140017940
jmp 0x140017a37
mov dword [rsp + 0x94], 0
mov rax, qword [rsp + 0xb8]
mov ecx, dword [rax + 8]
mov edx, ecx
mov rax, qword [rsp + 0x210]
mov r8, qword [rsp + 0xb8]
mov ecx, dword [r8 + 0xc]
mov r8d, ecx
add rax, r8
mov rcx, rax
mov r8d, 0x40
lea r9, [rsp + 0x94]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [rsp + 0x90], eax
mov rcx, qword [rsp + 0xb8]
mov eax, dword [rcx + 8]
mov r9d, eax
mov rcx, qword [rsp + 0xd8]
mov rdx, qword [rsp + 0xb8]
mov eax, dword [rdx + 0xc]
mov edx, eax
add rcx, rdx
mov rdx, qword [rsp + 0xb8]
mov eax, dword [rdx + 8]
mov edx, eax
mov r10, qword [rsp + 0x210]
mov r11, qword [rsp + 0xb8]
mov eax, dword [r11 + 0xc]
mov r11d, eax
add r10, r11
mov qword [rsp + 0x48], rcx
mov rcx, r10
mov r8, qword [rsp + 0x48]
call fcn.1400124f0
mov r8d, dword [rsp + 0x94]
mov rcx, qword [rsp + 0xb8]
mov esi, dword [rcx + 8]
mov edx, esi
mov rcx, qword [rsp + 0x210]
mov r9, qword [rsp + 0xb8]
mov esi, dword [r9 + 0xc]
mov r9d, esi
add rcx, r9
lea r9, [rsp + 0x94]
mov dword [rsp + 0x44], eax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [rsp + 0x90], eax
jmp 0x140017a3c
mov ax, word [rsp + 0xc6]
add ax, 1
mov word [rsp + 0xc6], ax
jmp 0x140017876
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xe0]
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd8]
mov dword [rsp + 0x3c], eax
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [rsp + 0x174], 0
lea rcx, [rsp + 0x150]
call fcn.140001770
mov eax, dword [rsp + 0x174]
test eax, eax
je 0x140017ab8
jmp 0x140017ab3
jmp 0x140017abd
jmp 0x140017abd
mov eax, dword [rsp + 0x21c]
add eax, 1
mov dword [rsp + 0x21c], eax
jmp 0x140017421
add rsp, 0x330
pop rsi
ret