Function at 0x140001910
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x40
lea r14, [0x14000a200]
mov r8d, 0x608
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edi, edi
test eax, eax
jne 0x14000194f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.Retrieving_module_name
call fcn.140001070
jmp 0x1400019c5
mov rax, 0xffffffffffffffff
inc rax
cmp word [r14 + rax*2], di
jne 0x140001956
cmp rax, 4
jbe 0x140001985
mov r8d, 4
lea rdx, [0x140006418]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
mov eax, 1
je 0x140001987
mov eax, edi
test eax, eax
lea rcx, [0x14000a208]
lea rdx, [0x1400099c0]
cmove rcx, r14
sub rdx, rcx
nop
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400019a0
mov edx, 0x5c
lea rcx, [0x1400099c0]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov word [rax], di
lea r8, str.PYTHONSCRIPT
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
test rax, rax
jne 0x1400019ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_locate_script_resource:
jmp 0x140001a63
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x140001a10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_load_script_resource:
jmp 0x140001a63
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x1400099a0], rax
mov rdx, rax
mov qword [0x14000a808], rax
test rax, rax
jne 0x140001a40
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_lock_script_resource:
jmp 0x140001a63
cmp dword [rdx], 0x78563412
lea rcx, [rdx + 0x10]
mov eax, dword [rax + 0xc]
mov qword [0x1400099a0], rcx
mov dword [0x14000999c], eax
je 0x140001a8c
lea rdx, str.Bug:_Invalid_script_resource
mov ecx, edi
call fcn.140001070
lea rdx, str.FATAL_ERROR:_Could_not_locate_script
mov ecx, 0xffffffff
call fcn.140001070
mov eax, 0xffffffff
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
mov qword [rsp + 0x50], rbx
mov rax, 0xffffffffffffffff
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rsi
inc rax
cmp byte [rcx + rax], dil
jne 0x140001aa2
add rax, 0x11
add rax, rdx
mov qword [0x1400099a0], rax
cmp byte [rcx], dil
je 0x140001ae4
mov qword [rsp + 0x20], rcx
lea r9, [0x1400099c0]
lea rcx, [0x140009be0]
mov edx, 0x608
lea r8, str._s_S
call fcn.140001190
jmp 0x140001af9
mov r8d, 0x608
lea rdx, [0x140009be0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edx, edx
lea rcx, [0x140009be0]
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
lea r8, [0x140006598]
mov edx, 1
mov rcx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rbp, rax
test rax, rax
je 0x140001b7f
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdx, rbp
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rbx
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
je 0x140001b7f
mov edx, ebp
mov qword [rsp + 0x38], rdi
mov rcx, rax
call fcn.1400025b0
test rax, rax
je 0x140001b7f
mov rdx, rax
lea rcx, [0x140006598]
call fcn.140002ec0
mov rbx, qword [rax]
jmp 0x140001b8f
lea rcx, [0x140006598]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
test rbx, rbx
jne 0x140001bb3
lea rdx, str.FATAL_ERROR:_Could_not_load_python_library
jmp 0x140001dba
mov r10, qword [0x1400097a8]
mov qword [0x1400098b8], rbx
test r10, r10
je 0x140001bd8
cmp rbx, qword [r10]
je 0x140001d82
mov r10, qword [r10 + 0x10]
test r10, r10
jne 0x140001bc6
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [0x140006e28]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
lea rcx, [0x140003360]
cmove rax, rcx
mov rax, qword [rax]
mov qword [sym.run_w_py3.8_win_amd64.exe_PyExc_SystemError], rax
test rax, rax
je 0x140001db3
lea rdx, [0x140006e40]
mov rcx, rbx
call fcn.1400033a0
mov rcx, qword [rax]
mov qword [sym.run_w_py3.8_win_amd64.exe_PyExc_ImportError], rcx
test rcx, rcx
je 0x140001db3
lea rdx, [0x140006e58]
mov rcx, rbx
call fcn.1400033a0
mov rcx, qword [rax]
mov qword [sym.run_w_py3.8_win_amd64.exe_PyExc_RuntimeError], rcx
test rcx, rcx
je 0x140001db3
mov rcx, rbx
call fcn.140001500
mov rax, qword [0x140009810]
test rax, rax
jne 0x140001c87
mov rcx, qword [0x1400098b8]
lea rdx, [0x140006bb8]
call fcn.1400033a0
mov qword [0x140009810], rax
lea rdx, [0x140003a80]
lea rcx, str._memimporter
call rax
mov rax, qword [0x1400098a0]
test rax, rax
jne 0x140001cbd
mov rcx, qword [0x1400098b8]
lea rdx, [0x140006b08]
call fcn.1400033a0
mov qword [0x1400098a0], rax
mov rcx, r14
call rax
mov rax, qword [0x1400098e0]
test rax, rax
jne 0x140001ce8
mov rcx, qword [0x1400098b8]
lea rdx, [0x140006aa8]
call fcn.1400033a0
mov qword [0x1400098e0], rax
lea rcx, [0x140009be0]
call rax
mov rax, qword [0x1400098f0]
test rax, rax
jne 0x140001d17
mov rcx, qword [0x1400098b8]
lea rdx, [0x140006ac8]
call fcn.1400033a0
mov qword [0x1400098f0], rax
call rax
lea rcx, str.windows_exe
call sym.run_w_py3.8_win_amd64.exe_PyUnicode_FromString
mov rbx, rax
test rax, rax
je 0x140001d6f
mov rax, qword [0x1400098d0]
test rax, rax
jne 0x140001d53
mov rcx, qword [0x1400098b8]
lea rdx, [0x140006dc8]
call fcn.1400033a0
mov qword [0x1400098d0], rax
mov rdx, rbx
lea rcx, [0x140006640]
call rax
sub qword [rbx], 1
jne 0x140001d6f
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
mov rbx, qword [rsp + 0x50]
xor eax, eax
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
mov eax, dword [r10 + 0x20]
lea rcx, str._FindMemoryModule__s___p______s__d__n
mov r9, qword [r10 + 8]
mov r8, rbx
xor edx, edx
mov dword [rsp + 0x20], eax
call fcn.140002ea0
mov rcx, qword [r10]
lea rdx, [0x140006e28]
call fcn.140002c10
jmp 0x140001c02
lea rdx, str.FATAL_ERROR:_Failed_to_load_some_Python_symbols
mov ecx, 0xffffffff
call fcn.140001070
mov rbx, qword [rsp + 0x50]
mov eax, 0xffffffff
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret