Function at 0x140047480
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.1400d8050
sub rsp, rax
movzx r14d, r9b
mov rdi, r8
mov r15, rcx
test r8, r8
je 0x140047968
cmp word [r8], 0
je 0x140047968
mov esi, dword [0x140122f80]
mov ebx, dword [0x140124300]
cmp esi, ebx
jl 0x140047561
cmp esi, 0xffff
jl 0x1400474fc
lea r8, [0x1400f9b70]
lea rdx, str.Too_many_includes.
call fcn.140010930
jmp 0x14004796a
test ebx, ebx
je 0x140047511
add ebx, ebx
cmp ebx, 0xffff
jle 0x140047516
mov ebx, 0xffff
jmp 0x140047516
mov ebx, WSAAsyncSelect
mov rcx, qword [0x140122f78]
movsxd rdx, ebx
shl rdx, 3
call fcn.1400bebac
mov rcx, rax
test rax, rax
jne 0x14004754c
lea r8, [0x1400f9b70]
mov rcx, r15
lea rdx, str.Out_of_memory.
call fcn.140010930
jmp 0x14004796a
mov esi, dword [0x140122f80]
mov qword [0x140122f78], rax
mov dword [0x140124300], ebx
jmp 0x140047568
mov rcx, qword [0x140122f78]
movzx eax, word [rdi]
xor r12d, r12d
test esi, esi
jne 0x14004758a
cmp ax, 0x2a
je 0x140047590
mov rax, qword [r15 + 0x750]
mov qword [rcx], rax
movsxd rbx, esi
jmp 0x140047624
cmp ax, 0x2a
jne 0x1400475b8
mov r8d, 0x7fff
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.1400cd4c4
lea rcx, [rsp + 0x40]
mov word [rbp + 0xff3e], r12w
call qword [sym.imp.USER32.dll_CharUpperW]
jmp 0x1400475d2
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 0x140047616
movsxd r14, esi
mov rbx, r12
test esi, esi
jle 0x140047616
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [0x140122f78]
lea rdx, [rsp + 0x40]
mov rcx, qword [rcx + rbx*8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140047918
inc rbx
cmp rbx, r14
jl 0x1400475f0
mov rax, qword [0x140122f78]
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 0x140047743
cmp word [rdi + 2], ax
lea rdx, [rdi + 2]
je 0x140047743
xor ecx, ecx
lea r8d, [rax + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r14, rax
test rax, rax
je 0x140047743
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140047737
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140047737
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.1400b8374
mov qword [rbp + 0x20010], rax
mov rbx, rax
mov ecx, dword [0x140124f88]
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 0x14004770a
lea rdx, [rbx + 0x18]
mov dword [rbx + 0x14], ecx
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x14004770a
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 0x140047766
mov rcx, qword [rbp + 0x20008]
movsxd rbx, esi
jmp 0x140047766
mov ecx, 0x48
call fcn.1400b8374
mov rcx, rax
mov qword [rbp + 0x20010], rax
call fcn.140007ca4
mov rcx, qword [rbp + 0x20008]
mov qword [rcx], rax
mov rcx, qword [rcx]
test rcx, rcx
je 0x14004790f
mov r9d, r13d
mov r8d, 0x30c
mov rdx, r12
call fcn.140097db0
test al, al
je 0x14004790f
mov rax, qword [0x140122f78]
lea r12, [rbx*8]
cmp qword [r12 + rax], 0
jne 0x140047812
cmp word [rsp + 0x40], 0
je 0x140047802
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1400477b5
lea r14, [rbx + rbx]
lea rcx, [r14 + 2]
call fcn.140097680
mov rdi, rax
test rax, rax
je 0x140047985
test rbx, rbx
je 0x1400477ed
mov r8, r14
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.1400ba140
mov rax, qword [0x140122f78]
xor r13d, r13d
mov word [r14 + rdi], r13w
mov qword [r12 + rax], rdi
jmp 0x140047815
lea rdi, [0x1400f9b70]
xor r13d, r13d
mov qword [r12 + rax], rdi
jmp 0x140047815
xor r13d, r13d
inc dword [0x140122f80]
test esi, esi
jne 0x140047888
lea edx, [rsi + 2]
xor ecx, ecx
lea r8d, [rsi + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x140047850
xor r9d, r9d
lea rdx, [0x140102848]
xor r8d, r8d
mov rcx, r15
call fcn.140047990
test eax, eax
je 0x140047968
mov rdx, qword [r15 + 0x798]
test rdx, rdx
je 0x140047872
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call fcn.140047990
test eax, eax
je 0x140047968
mov rcx, qword [r15 + 0x758]
call fcn.1400628a0
mov eax, 3
jmp 0x14004796a
mov esi, 0x5c
lea rcx, [rsp + 0x40]
mov edx, esi
call fcn.1400b9fdc
mov rdi, rax
lea rax, [rsp + 0x40]
cmp rdi, rax
jbe 0x140047908
mov word [rdi], r13w
lea rbx, [rsp + 0x40]
movzx ecx, word [rsp + 0x40]
test cx, cx
je 0x1400478e7
movzx eax, word [rsp + 0x42]
cmp ax, 0x3a
jne 0x1400478e7
cmp word [rsp + 0x44], 0
jne 0x1400478e7
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 0x140047905
cmp byte [0x140124d3c], 0
je 0x140047905
mov rcx, rbx
call fcn.140062910
mov word [rdi], si
mov eax, 3
jmp 0x14004796a
cmp byte [rbp + 0x20020], 0
je 0x14004791f
mov eax, 1
jmp 0x14004796a
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.14009abe0
lea r8, [0x1400f9b70]
mov rcx, r15
lea rdx, [rbp + 0xff40]
call fcn.140010930
jmp 0x14004796a
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.140011050
int3