Function at 0x140047450
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.1400d7a10
sub rsp, rax
movzx r14d, r9b
mov rdi, r8
mov r15, rcx
test r8, r8
je 0x140047938
cmp word [r8], 0
je 0x140047938
mov esi, dword [0x140122ee4]
mov ebx, dword [0x1401241d8]
cmp esi, ebx
jl 0x140047531
cmp esi, 0xffff
jl 0x1400474cc
lea r8, [0x1400f9b50]
lea rdx, str.Too_many_includes.
call fcn.140010900
jmp 0x14004793a
test ebx, ebx
je 0x1400474e1
add ebx, ebx
cmp ebx, 0xffff
jle 0x1400474e6
mov ebx, 0xffff
jmp 0x1400474e6
mov ebx, WSAAsyncSelect
mov rcx, qword [0x140122ef8]
movsxd rdx, ebx
shl rdx, 3
call fcn.1400be2fc
mov rcx, rax
test rax, rax
jne 0x14004751c
lea r8, [0x1400f9b50]
mov rcx, r15
lea rdx, str.Out_of_memory.
call fcn.140010900
jmp 0x14004793a
mov esi, dword [0x140122ee4]
mov qword [0x140122ef8], rax
mov dword [0x1401241d8], ebx
jmp 0x140047538
mov rcx, qword [0x140122ef8]
movzx eax, word [rdi]
xor r12d, r12d
test esi, esi
jne 0x14004755a
cmp ax, 0x2a
je 0x140047560
mov rax, qword [r15 + 0x750]
mov qword [rcx], rax
movsxd rbx, esi
jmp 0x1400475f4
cmp ax, 0x2a
jne 0x140047588
mov r8d, 0x7fff
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.1400cd014
lea rcx, [rsp + 0x40]
mov word [rbp + 0xff3e], r12w
call qword [sym.imp.USER32.dll_CharUpperW]
jmp 0x1400475a2
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 0x1400475e6
movsxd r14, esi
mov rbx, r12
test esi, esi
jle 0x1400475e6
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [0x140122ef8]
lea rdx, [rsp + 0x40]
mov rcx, qword [rcx + rbx*8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400478e8
inc rbx
cmp rbx, r14
jl 0x1400475c0
mov rax, qword [0x140122ef8]
movsxd rbx, esi
mov qword [rax + rbx*8], r12
mov r13d, dword [0x14011c198]
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 0x140047713
cmp word [rdi + 2], ax
lea rdx, [rdi + 2]
je 0x140047713
xor ecx, ecx
lea r8d, [rax + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r14, rax
test rax, rax
je 0x140047713
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140047707
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140047707
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.1400b7ac4
mov qword [rbp + 0x20010], rax
mov rbx, rax
mov ecx, dword [0x140124f08]
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 0x1400476da
lea rdx, [rbx + 0x18]
mov dword [rbx + 0x14], ecx
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x1400476da
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 0x140047736
mov rcx, qword [rbp + 0x20008]
movsxd rbx, esi
jmp 0x140047736
mov ecx, 0x48
call fcn.1400b7ac4
mov rcx, rax
mov qword [rbp + 0x20010], rax
call fcn.140007c84
mov rcx, qword [rbp + 0x20008]
mov qword [rcx], rax
mov rcx, qword [rcx]
test rcx, rcx
je 0x1400478df
mov r9d, r13d
mov r8d, 0x30c
mov rdx, r12
call fcn.140097500
test al, al
je 0x1400478df
mov rax, qword [0x140122ef8]
lea r12, [rbx*8]
cmp qword [r12 + rax], 0
jne 0x1400477e2
cmp word [rsp + 0x40], 0
je 0x1400477d2
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140047785
lea r14, [rbx + rbx]
lea rcx, [r14 + 2]
call fcn.140096dd0
mov rdi, rax
test rax, rax
je 0x140047955
test rbx, rbx
je 0x1400477bd
mov r8, r14
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.1400b9890
mov rax, qword [0x140122ef8]
xor r13d, r13d
mov word [r14 + rdi], r13w
mov qword [r12 + rax], rdi
jmp 0x1400477e5
lea rdi, [0x1400f9b50]
xor r13d, r13d
mov qword [r12 + rax], rdi
jmp 0x1400477e5
xor r13d, r13d
inc dword [0x140122ee4]
test esi, esi
jne 0x140047858
lea edx, [rsi + 2]
xor ecx, ecx
lea r8d, [rsi + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x140047820
xor r9d, r9d
lea rdx, [0x140102828]
xor r8d, r8d
mov rcx, r15
call fcn.140047960
test eax, eax
je 0x140047938
mov rdx, qword [r15 + 0x798]
test rdx, rdx
je 0x140047842
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call fcn.140047960
test eax, eax
je 0x140047938
mov rcx, qword [r15 + 0x758]
call fcn.140062860
mov eax, 3
jmp 0x14004793a
mov esi, 0x5c
lea rcx, [rsp + 0x40]
mov edx, esi
call fcn.1400b972c
mov rdi, rax
lea rax, [rsp + 0x40]
cmp rdi, rax
jbe 0x1400478d8
mov word [rdi], r13w
lea rbx, [rsp + 0x40]
movzx ecx, word [rsp + 0x40]
test cx, cx
je 0x1400478b7
movzx eax, word [rsp + 0x42]
cmp ax, 0x3a
jne 0x1400478b7
cmp word [rsp + 0x44], 0
jne 0x1400478b7
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 0x1400478d5
cmp byte [0x140124cbc], 0
je 0x1400478d5
mov rcx, rbx
call fcn.1400628d0
mov word [rdi], si
mov eax, 3
jmp 0x14004793a
cmp byte [rbp + 0x20020], 0
je 0x1400478ef
mov eax, 1
jmp 0x14004793a
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.14009a330
lea r8, [0x1400f9b50]
mov rcx, r15
lea rdx, [rbp + 0xff40]
call fcn.140010900
jmp 0x14004793a
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.140011020
int3