Function at 0x1400498c0
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 - 0x1ffd0]
mov eax, 0x200d0
call fcn.1400e37c0
sub rsp, rax
movzx esi, r9b
mov r12, r8
mov r14, rcx
test r8, r8
je 0x140049e67
cmp word [r8], 0
je 0x140049e67
mov ebx, dword [0x1401333b8]
mov eax, dword [0x140134740]
cmp ebx, eax
jl 0x140049ae1
cmp ebx, 0xffff
jl 0x1400499dd
mov rax, qword [rcx + 0x798]
movzx ecx, byte [0x14013529c]
test rax, rax
je 0x14004996b
test cl, cl
je 0x14004996b
xor edi, edi
lea r8, [0x140106cb0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Too_many_includes.
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.14000fb70
mov edi, eax
jmp 0x140049e69
xor edi, edi
cmp byte [0x14013529f], dil
je 0x1400499b8
test cl, cl
jne 0x1400499b8
test rax, rax
je 0x140049989
movzx r9d, word [rax + 2]
mov ecx, dword [rax + 4]
jmp 0x140049997
mov r9d, dword [r14 + 0x3b8]
mov ecx, dword [r14 + 0x3bc]
mov dword [rsp + 0x20], ecx
lea r8, [0x140106cb0]
mov rcx, r14
lea rdx, str.Too_many_includes.
call fcn.14000fa20
mov eax, edi
jmp 0x140049e69
lea r9, [0x140106cb0]
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rdx, str.Too_many_includes.
mov rcx, r14
call fcn.140010b10
mov eax, edi
jmp 0x140049e69
test eax, eax
je 0x1400499f3
lea ebx, [rax + rax]
cmp ebx, 0xffff
jle 0x1400499f8
mov ebx, 0xffff
jmp 0x1400499f8
mov ebx, WSAAsyncSelect
mov rcx, qword [0x1401333b0]
movsxd rdx, ebx
shl rdx, 3
call fcn.1400ca1b4
mov rdx, rax
test rax, rax
jne 0x140049acc
mov rax, qword [r14 + 0x798]
movzx ecx, byte [0x14013529c]
test rax, rax
je 0x140049a5a
test cl, cl
je 0x140049a5a
xor edi, edi
lea r8, [0x140106cb0]
mov qword [rsp + 0x28], rdi
lea rdx, str.Out_of_memory.
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.14000fb70
mov edi, eax
jmp 0x140049e69
xor edi, edi
cmp byte [0x14013529f], dil
je 0x140049aa7
test cl, cl
jne 0x140049aa7
test rax, rax
je 0x140049a78
movzx r9d, word [rax + 2]
mov ecx, dword [rax + 4]
jmp 0x140049a86
mov r9d, dword [r14 + 0x3b8]
mov ecx, dword [r14 + 0x3bc]
mov dword [rsp + 0x20], ecx
lea r8, [0x140106cb0]
mov rcx, r14
lea rdx, str.Out_of_memory.
call fcn.14000fa20
mov eax, edi
jmp 0x140049e69
lea r9, [0x140106cb0]
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, r14
call fcn.140010b10
mov eax, edi
jmp 0x140049e69
mov dword [0x140134740], ebx
mov ebx, dword [0x1401333b8]
mov qword [0x1401333b0], rax
jmp 0x140049ae8
mov rdx, qword [0x1401333b0]
movzx eax, word [r12]
xor edi, edi
mov dword [rsp + 0x34], ebx
lea r15, [rdi - 1]
test ebx, ebx
jne 0x140049b14
cmp ax, 0x2a
je 0x140049b1a
mov rax, qword [r14 + 0x840]
movsxd rcx, ebx
mov qword [rdx + rcx*8], rax
jmp 0x140049bb6
cmp ax, 0x2a
jne 0x140049b41
mov r8d, 0x7fff
lea rcx, [rsp + 0x50]
mov rdx, r12
call fcn.1400d8b44
lea rcx, [rsp + 0x50]
mov word [rbp + 0xff4e], di
call qword [sym.imp.USER32.dll_CharUpperW]
jmp 0x140049b5b
lea r9, [rbp + 0x20020]
mov edx, 0x8000
lea r8, [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov eax, dword [0x1401333b8]
mov ebx, edi
test eax, eax
jle 0x140049ba8
nop word [rax + rax]
mov rcx, qword [0x1401333b0]
lea r8, [rsp + 0x50]
movsxd rax, ebx
mov r9d, r15d
mov edx, r15d
mov dword [rsp + 0x20], 1
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_CompareStringOrdinal]
cmp eax, 2
mov eax, dword [0x1401333b8]
je 0x140049ba8
inc ebx
cmp ebx, eax
jl 0x140049b70
movsxd rcx, eax
mov rax, qword [0x1401333b0]
mov qword [rax + rcx*8], rdi
mov rax, qword [r14 + 0x128]
movzx edx, word [rax + 0x60]
test edx, edx
je 0x140049be5
mov rax, qword [rax + 0x58]
mov rcx, rdi
nop dword [rax]
cmp word [rax], bx
je 0x140049d06
inc rcx
add rax, 2
cmp rcx, rdx
jl 0x140049bd0
mov byte [rbp + 0x20020], dil
cmp word [r12], 0x2a
mov r13, r12
mov eax, dword [0x14012c3a8]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x40], edi
mov byte [rsp + 0x44], dil
jne 0x140049d1b
cmp word [r12 + 2], di
lea rdx, [r12 + 2]
je 0x140049d1b
xor ecx, ecx
lea r8d, [rcx + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
je 0x140049d1b
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140049d3e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140049d3e
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, 0x58
mov dword [rsp + 0x30], 0xfde9
mov dword [rsp + 0x40], eax
lea r13, [rsp + 0x38]
call fcn.1400c3354
mov ecx, dword [0x1401354f0]
mov rsi, rax
mov qword [rsp + 0x48], rax
lea rax, vtable.TextStream.0
mov qword [rsi], rax
mov qword [rsi + 8], rdi
mov dword [rsi + 0x10], edi
mov dword [rsi + 0x14], 0xffffffff
mov byte [rsi + 0x2c], dil
mov word [rsi + 0x2e], di
mov qword [rsi + 0x30], rdi
mov qword [rsi + 0x38], rdi
cmp ecx, 0xffffffff
je 0x140049cdd
lea rdx, [rsi + 0x18]
mov dword [rsi + 0x14], ecx
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x140049cdd
mov byte [rsi + 0x1e], dil
mov rcx, qword [rbp + 0x20018]
lea rax, vtable.TextMem.0
mov qword [rsi], rax
mov byte [rsi + 0x4c], 1
mov qword [rsi + 0x40], rdi
mov qword [rcx], rsi
mov dword [rsi + 0x48], edi
mov byte [rsi + 0x4c], dil
mov qword [rsi + 0x50], rdi
jmp 0x140049d45
mov byte [rbp + 0x20020], 1
test sil, sil
je 0x140049fae
jmp 0x140049bec
mov ecx, 0x48
call fcn.1400c3354
mov rcx, rax
mov qword [rsp + 0x48], rax
call fcn.140007b54
mov rcx, qword [rbp + 0x20018]
mov qword [rcx], rax
jmp 0x140049d45
mov rcx, qword [rbp + 0x20018]
mov rcx, qword [rcx]
test rcx, rcx
je 0x140049fa5
mov r9d, dword [rsp + 0x30]
mov r8d, 0x30c
mov rdx, r13
call fcn.1400a2c30
test al, al
je 0x140049fa5
movsxd rax, ebx
lea r13, [rax*8]
mov rax, qword [0x1401333b0]
cmp qword [rax + r13], rdi
jne 0x140049de2
cmp word [rsp + 0x50], di
je 0x140049dd7
lea rax, [rsp + 0x50]
inc r15
cmp word [rax + r15*2], di
jne 0x140049d90
lea r12, [r15 + r15]
lea rcx, [r12 + 2]
call fcn.1400a24c0
mov rsi, rax
test rax, rax
je 0x14004a09a
test r15, r15
je 0x140049dc9
mov r8, r12
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.1400e78c0
mov rax, qword [0x1401333b0]
mov word [r12 + rsi], di
jmp 0x140049dde
lea rsi, [0x140106cb0]
mov qword [rax + r13], rsi
mov eax, dword [0x1401333b8]
cmp ebx, eax
jne 0x140049df4
inc eax
mov dword [0x1401333b8], eax
cmp byte [rbp + 0x20020], dil
jne 0x140049e9d
mov rsi, qword [r14 + 0x128]
movzx eax, word [rsi + 0x60]
cmp ax, word [rsi + 0x62]
jne 0x140049e8d
test ax, ax
je 0x140049e1f
mov r15d, eax
add r15d, r15d
jmp 0x140049e25
mov r15d, 8
mov rcx, qword [rsi + 0x58]
mov edx, r15d
add rdx, rdx
call fcn.1400ca1b4
test rax, rax
jne 0x140049e84
mov rax, qword [0x140134898]
lea rdx, str.Out_of_memory.
mov qword [rsp + 0x28], rax
lea rcx, [0x140134a20]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call fcn.14000fb70
test eax, eax
jne 0x140049e9d
xor eax, eax
mov rbx, qword [rsp + 0x20110]
add rsp, 0x200d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov qword [rsi + 0x58], rax
mov word [rsi + 0x62], r15w
movzx ecx, word [rsi + 0x60]
mov rax, qword [rsi + 0x58]
mov word [rax + rcx*2], bx
inc word [rsi + 0x60]
cmp dword [rsp + 0x34], edi
jne 0x140049ef4
mov edx, 2
xor ecx, ecx
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x140049ed2
xor r9d, r9d
lea rdx, [0x14010fc80]
xor r8d, r8d
mov rcx, r14
call fcn.14004a0a0
test eax, eax
je 0x140049e67
mov rdx, qword [r14 + 0x888]
test rdx, rdx
je 0x140049ef4
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call fcn.14004a0a0
test eax, eax
je 0x140049e67
mov dword [r14 + 0x3b8], ebx
test ebx, ebx
je 0x140049f8f
mov r14d, 0x5c
lea rcx, [rsp + 0x50]
mov edx, r14d
call fcn.1400c4ff4
mov rsi, rax
lea rax, [rsp + 0x50]
cmp rsi, rax
jbe 0x140049f9b
mov word [rsi], di
lea rbx, [rsp + 0x50]
movzx ecx, word [rsp + 0x50]
test cx, cx
je 0x140049f63
movzx eax, word [rsp + 0x52]
cmp ax, 0x3a
jne 0x140049f63
cmp word [rsp + 0x54], di
jne 0x140049f63
mov word [rbp + 0x20020], cx
lea rbx, [rbp + 0x20020]
mov word [rbp + 0x20022], ax
mov dword [rbp + 0x20024], r14d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x140049f81
cmp byte [0x14013529c], dil
je 0x140049f81
mov rcx, rbx
call fcn.140068330
mov word [rsi], r14w
mov eax, 3
jmp 0x140049e69
mov rcx, qword [r14 + 0x848]
call fcn.1400682c0
mov eax, 3
jmp 0x140049e69
cmp byte [rbp + 0x20030], dil
je 0x140049fb8
mov eax, 1
jmp 0x140049e69
lea rax, str.Include
mov qword [rsp + 0x20], r12
test ebx, ebx
lea r9, str.Script
lea r8, str._s_file___s__cannot_be_opened.
mov edx, 0x8040
cmovne r9, rax
lea rcx, [rbp + 0xff50]
call fcn.1400a5c90
mov rax, qword [r14 + 0x798]
movzx ecx, byte [0x14013529c]
test rax, rax
je 0x14004a02a
test cl, cl
je 0x14004a02a
mov qword [rsp + 0x28], rdi
lea r8, [0x140106cb0]
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0xff50]
mov rcx, r14
call fcn.14000fb70
mov edi, eax
jmp 0x140049e69
cmp byte [0x14013529f], dil
je 0x14004a075
test cl, cl
jne 0x14004a075
test rax, rax
je 0x14004a046
movzx r9d, word [rax + 2]
mov ecx, dword [rax + 4]
jmp 0x14004a054
mov r9d, dword [r14 + 0x3b8]
mov ecx, dword [r14 + 0x3bc]
mov dword [rsp + 0x20], ecx
lea r8, [0x140106cb0]
mov rcx, r14
lea rdx, [rbp + 0xff50]
call fcn.14000fa20
mov eax, edi
jmp 0x140049e69
lea r9, [0x140106cb0]
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rdx, [rbp + 0xff50]
mov rcx, r14
call fcn.140010b10
mov eax, edi
jmp 0x140049e69
call fcn.140011360
int3