Function at 0x140048020
Capabilities:
Extract resource via kernel32 functions
Set current directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1ffc0]
mov eax, 0x200c0
call fcn.1400d9cc0
sub rsp, rax
movzx r14d, r9b
mov rdi, r8
mov r15, rcx
test r8, r8
je 0x140048508
cmp word [r8], 0
je 0x140048508
mov esi, dword [0x140125fc8]
mov ebx, dword [0x140127350]
cmp esi, ebx
jl 0x140048101
cmp esi, 0xffff
jl 0x14004809c
lea r8, [0x1400fbbd0]
lea rdx, str.Too_many_includes.
call fcn.140010a80
jmp 0x14004850a
test ebx, ebx
je 0x1400480b1
add ebx, ebx
cmp ebx, 0xffff
jle 0x1400480b6
mov ebx, 0xffff
jmp 0x1400480b6
mov ebx, WSAAsyncSelect
mov rcx, qword [0x140125fc0]
movsxd rdx, ebx
shl rdx, 3
call fcn.1400c069c
mov rcx, rax
test rax, rax
jne 0x1400480ec
lea r8, [0x1400fbbd0]
mov rcx, r15
lea rdx, str.Out_of_memory.
call fcn.140010a80
jmp 0x14004850a
mov esi, dword [0x140125fc8]
mov qword [0x140125fc0], rax
mov dword [0x140127350], ebx
jmp 0x140048108
mov rcx, qword [0x140125fc0]
movzx eax, word [rdi]
xor r12d, r12d
test esi, esi
jne 0x14004812a
cmp ax, 0x2a
je 0x140048130
mov rax, qword [r15 + 0x758]
mov qword [rcx], rax
movsxd rbx, esi
jmp 0x1400481c4
cmp ax, 0x2a
jne 0x140048158
mov r8d, 0x7fff
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.1400cf044
lea rcx, [rsp + 0x40]
mov word [rbp + 0xff3e], r12w
call qword [sym.imp.USER32.dll_CharUpperW]
jmp 0x140048172
lea r9, [rbp + 0x20010]
mov edx, 0x8000
lea r8, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test r14b, r14b
jne 0x1400481b6
movsxd r14, esi
mov rbx, r12
test esi, esi
jle 0x1400481b6
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [0x140125fc0]
lea rdx, [rsp + 0x40]
mov rcx, qword [rcx + rbx*8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400484b8
inc rbx
cmp rbx, r14
jl 0x140048190
mov rax, qword [0x140125fc0]
movsxd rbx, esi
mov qword [rax + rbx*8], r12
mov r13d, dword [0x14011f198]
xor eax, eax
cmp word [rdi], 0x2a
mov r12, rdi
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], eax
mov byte [rsp + 0x3c], al
jne 0x1400482e3
cmp word [rdi + 2], ax
lea rdx, [rdi + 2]
je 0x1400482e3
xor ecx, ecx
lea r8d, [rax + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r14, rax
test rax, rax
je 0x1400482e3
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x1400482d7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x1400482d7
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, 0x58
mov dword [rsp + 0x38], eax
lea r12, [rsp + 0x30]
mov r13d, 0xfde9
call fcn.1400b9e64
mov qword [rbp + 0x20010], rax
mov rbx, rax
mov ecx, dword [0x140128010]
lea rax, vtable.TextStream.0
xor r14d, r14d
mov qword [rbx], rax
mov qword [rbx + 8], r14
mov dword [rbx + 0x10], r14d
mov dword [rbx + 0x14], 0xffffffff
mov qword [rbx + 0x30], r14
mov qword [rbx + 0x38], r14
cmp ecx, 0xffffffff
je 0x1400482aa
lea rdx, [rbx + 0x18]
mov dword [rbx + 0x14], ecx
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x1400482aa
mov byte [rbx + 0x1e], r14b
mov rcx, qword [rbp + 0x20008]
lea rax, vtable.TextMem.0
mov qword [rbx], rax
mov byte [rbx + 0x4c], 1
mov qword [rbx + 0x40], r14
mov qword [rcx], rbx
mov dword [rbx + 0x48], r14d
mov byte [rbx + 0x4c], r14b
mov qword [rbx + 0x50], r14
movsxd rbx, esi
jmp 0x140048306
mov rcx, qword [rbp + 0x20008]
movsxd rbx, esi
jmp 0x140048306
mov ecx, 0x48
call fcn.1400b9e64
mov rcx, rax
mov qword [rbp + 0x20010], rax
call fcn.140007cd4
mov rcx, qword [rbp + 0x20008]
mov qword [rcx], rax
mov rcx, qword [rcx]
test rcx, rcx
je 0x1400484af
mov r9d, r13d
mov r8d, 0x30c
mov rdx, r12
call fcn.1400998a0
test al, al
je 0x1400484af
mov rax, qword [0x140125fc0]
lea r12, [rbx*8]
cmp qword [r12 + rax], 0
jne 0x1400483b2
cmp word [rsp + 0x40], 0
je 0x1400483a2
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140048355
lea r14, [rbx + rbx]
lea rcx, [r14 + 2]
call fcn.140099170
mov rdi, rax
test rax, rax
je 0x140048525
test rbx, rbx
je 0x14004838d
mov r8, r14
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.1400bbc40
mov rax, qword [0x140125fc0]
xor r13d, r13d
mov word [r14 + rdi], r13w
mov qword [r12 + rax], rdi
jmp 0x1400483b5
lea rdi, [0x1400fbbd0]
xor r13d, r13d
mov qword [r12 + rax], rdi
jmp 0x1400483b5
xor r13d, r13d
inc dword [0x140125fc8]
test esi, esi
jne 0x140048428
lea edx, [rsi + 2]
xor ecx, ecx
lea r8d, [rsi + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x1400483f0
xor r9d, r9d
lea rdx, [0x1401048a8]
xor r8d, r8d
mov rcx, r15
call fcn.140048530
test eax, eax
je 0x140048508
mov rdx, qword [r15 + 0x7a0]
test rdx, rdx
je 0x140048412
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call fcn.140048530
test eax, eax
je 0x140048508
mov rcx, qword [r15 + 0x760]
call fcn.1400637d0
mov eax, 3
jmp 0x14004850a
mov esi, 0x5c
lea rcx, [rsp + 0x40]
mov edx, esi
call fcn.1400bbadc
mov rdi, rax
lea rax, [rsp + 0x40]
cmp rdi, rax
jbe 0x1400484a8
mov word [rdi], r13w
lea rbx, [rsp + 0x40]
movzx ecx, word [rsp + 0x40]
test cx, cx
je 0x140048487
movzx eax, word [rsp + 0x42]
cmp ax, 0x3a
jne 0x140048487
cmp word [rsp + 0x44], 0
jne 0x140048487
mov word [rbp + 0x20010], cx
lea rbx, [rbp + 0x20010]
mov word [rbp + 0x20012], ax
mov dword [rbp + 0x20014], esi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x1400484a5
cmp byte [0x140127db4], 0
je 0x1400484a5
mov rcx, rbx
call fcn.140063840
mov word [rdi], si
mov eax, 3
jmp 0x14004850a
cmp byte [rbp + 0x20020], 0
je 0x1400484bf
mov eax, 1
jmp 0x14004850a
lea rax, str.Include
mov qword [rsp + 0x20], rdi
test esi, esi
lea r9, str.Script
lea r8, str._s_file___s__cannot_be_opened.
mov edx, 0x8040
cmovne r9, rax
lea rcx, [rbp + 0xff40]
call fcn.14009c920
lea r8, [0x1400fbbd0]
mov rcx, r15
lea rdx, [rbp + 0xff40]
call fcn.140010a80
jmp 0x14004850a
xor eax, eax
mov rbx, qword [rsp + 0x20100]
add rsp, 0x200c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140011190
int3