Function at 0x140002110
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x40
lea r14, [0x14000cbc0]
mov r8d, 0x608
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edi, edi
test eax, eax
jne 0x14000214f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.Retrieving_module_name
call fcn.140001f10
jmp 0x1400021c5
mov rax, 0xffffffffffffffff
inc rax
cmp word [r14 + rax*2], di
jne 0x140002156
cmp rax, 4
jbe 0x140002185
mov r8d, 4
lea rdx, str.__
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
mov eax, 1
je 0x140002187
mov eax, edi
test eax, eax
lea rcx, [0x14000cbc8]
lea rdx, [0x14000c380]
cmove rcx, r14
sub rdx, rcx
nop
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400021a0
mov edx, 0x5c
lea rcx, [0x14000c380]
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 0x1400021ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_locate_script_resource:
jmp 0x140002263
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x140002210
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_load_script_resource:
jmp 0x140002263
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x14000c360], rax
mov rdx, rax
mov qword [0x14000d1c8], rax
test rax, rax
jne 0x140002240
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_lock_script_resource:
jmp 0x140002263
cmp dword [rdx], 0x78563412
lea rcx, [rdx + 0x10]
mov eax, dword [rax + 0xc]
mov qword [0x14000c360], rcx
mov dword [0x14000c35c], eax
je 0x14000228c
lea rdx, str.Bug:_Invalid_script_resource
mov ecx, edi
call fcn.140001f10
lea rdx, str.FATAL_ERROR:_Could_not_locate_script
mov ecx, 0xffffffff
call fcn.140001f10
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 0x1400022a2
add rax, 0x11
add rax, rdx
mov qword [0x14000c360], rax
cmp byte [rcx], dil
je 0x1400022e4
mov qword [rsp + 0x20], rcx
lea r9, [0x14000c380]
lea rcx, [0x14000c5a0]
mov edx, 0x608
lea r8, str._s_S
call fcn.140001070
jmp 0x1400022f9
mov r8d, 0x608
lea rdx, [0x14000c5a0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edx, edx
lea rcx, [0x14000c5a0]
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
lea r8, str.python37.dll
mov edx, 1
mov rcx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rbp, rax
test rax, rax
je 0x1400023e0
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 0x1400023d7
mov edx, ebp
mov qword [rsp + 0x38], rdi
mov rcx, rax
call fcn.1400033d0
mov rbp, rax
test rax, rax
je 0x1400023d7
mov ecx, 0x28
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea rcx, [0x14000b2c0]
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rcx, qword [0x14000c1a8]
lea rdx, [0x14000b2c0]
mov qword [rbx + 0x10], rcx
mov r9, rbx
lea rcx, str._AddMemoryModule__s___p______p__d__n
mov qword [rbx + 8], rax
mov r8, rbp
mov qword [rbx], rbp
mov qword [rbx + 0x18], rdi
mov dword [rbx + 0x20], 1
mov qword [0x14000c1a8], rbx
mov dword [rsp + 0x20], 1
call fcn.140004880
mov rbx, qword [rbx]
jmp 0x1400023f0
lea rcx, [0x14000b2c0]
jmp 0x1400023e7
lea rcx, [0x14000b2b0]
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 0x14000242b
lea rdx, str.FATAL_ERROR:_Could_not_load_python_library
lea ecx, [rbx - 1]
call fcn.140001f10
lea eax, [rbx - 1]
mov rbx, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
mov rcx, rbx
call fcn.140007000
test eax, eax
jns 0x14000245e
lea rdx, str.FATAL_ERROR:_Failed_to_load_some_Python_symbols
mov ecx, 0xffffffff
call fcn.140001f10
mov rbx, qword [rsp + 0x50]
mov eax, 0xffffffff
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
mov rcx, rbx
call fcn.140002620
lea rdx, [0x140004e40]
lea rcx, str._memimporter
call sym.run_w_py3.7_win_amd64.exe_PyImport_AppendInittab
mov rcx, r14
call sym.run_w_py3.7_win_amd64.exe_Py_SetProgramName
lea rcx, [0x14000c5a0]
call sym.run_w_py3.7_win_amd64.exe_Py_SetPath
call sym.run_w_py3.7_win_amd64.exe_Py_Initialize
lea rcx, str.windows_exe
call sym.run_w_py3.7_win_amd64.exe_PyUnicode_FromString
mov rbx, rax
test rax, rax
je 0x1400024c5
mov rdx, rax
lea rcx, [0x14000b20c]
call sym.run_w_py3.7_win_amd64.exe_PySys_SetObject
sub qword [rbx], 1
jne 0x1400024c5
mov rdx, qword [rbx + 8]
mov rcx, rbx
call qword [rdx + 0x30]
mov rbx, qword [rsp + 0x50]
xor eax, eax
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret