Function at 0x140002100
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x40
lea r14, [0x14000cca0]
mov r8d, 0x608
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edi, edi
test eax, eax
jne 0x14000213f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.Retrieving_module_name
call fcn.140001f00
jmp 0x1400021b5
mov rax, 0xffffffffffffffff
inc rax
cmp word [r14 + rax*2], di
jne 0x140002146
cmp rax, 4
jbe 0x140002175
mov r8d, 4
lea rdx, [0x14000b470]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
mov eax, 1
je 0x140002177
mov eax, edi
test eax, eax
lea rcx, [0x14000cca8]
lea rdx, [0x14000c460]
cmove rcx, r14
sub rdx, rcx
nop
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140002190
mov edx, 0x5c
lea rcx, [0x14000c460]
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 0x1400021df
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_locate_script_resource:
jmp 0x140002253
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x140002200
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_load_script_resource:
jmp 0x140002253
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x14000c458], rax
mov rdx, rax
mov qword [0x14000d2a8], rax
test rax, rax
jne 0x140002230
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str.Could_not_lock_script_resource:
jmp 0x140002253
cmp dword [rdx], 0x78563412
lea rcx, [rdx + 0x10]
mov eax, dword [rax + 0xc]
mov qword [0x14000c458], rcx
mov dword [0x14000c454], eax
je 0x14000227c
lea rdx, str.Bug:_Invalid_script_resource
mov ecx, edi
call fcn.140001f00
lea rdx, str.FATAL_ERROR:_Could_not_locate_script
mov ecx, 0xffffffff
call fcn.140001f00
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 0x140002292
add rax, 0x11
add rax, rdx
mov qword [0x14000c458], rax
cmp byte [rcx], dil
je 0x1400022d4
mov qword [rsp + 0x20], rcx
lea r9, [0x14000c460]
lea rcx, [0x14000c680]
mov edx, 0x608
lea r8, str._s_S
call fcn.140001070
jmp 0x1400022e9
mov r8d, 0x608
lea rdx, [0x14000c680]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edx, edx
lea rcx, [0x14000c680]
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
lea r8, [0x14000b2d0]
mov edx, 1
mov rcx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rbp, rax
test rax, rax
je 0x1400023d0
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 0x1400023c7
mov edx, ebp
mov qword [rsp + 0x38], rdi
mov rcx, rax
call fcn.1400033c0
mov rbp, rax
test rax, rax
je 0x1400023c7
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 [0x14000c268]
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 [0x14000c268], rbx
mov dword [rsp + 0x20], 1
call fcn.140004870
mov rbx, qword [rbx]
jmp 0x1400023e0
lea rcx, [0x14000b2c0]
jmp 0x1400023d7
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 0x14000241b
lea rdx, str.FATAL_ERROR:_Could_not_load_python_library
lea ecx, [rbx - 1]
call fcn.140001f00
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.1400075b0
test eax, eax
jns 0x14000244e
lea rdx, str.FATAL_ERROR:_Failed_to_load_some_Python_symbols
mov ecx, 0xffffffff
call fcn.140001f00
mov rbx, qword [rsp + 0x50]
mov eax, 0xffffffff
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
mov rcx, rbx
call fcn.140002610
lea rdx, [0x140004ea0]
lea rcx, str._memimporter
call sym.run_w_py3.6_win_amd64.exe_PyImport_AppendInittab
mov rcx, r14
call sym.run_w_py3.6_win_amd64.exe_Py_SetProgramName
lea rcx, [0x14000c680]
call sym.run_w_py3.6_win_amd64.exe_Py_SetPath
call sym.run_w_py3.6_win_amd64.exe_Py_Initialize
lea rcx, str.windows_exe
call sym.run_w_py3.6_win_amd64.exe_PyUnicode_FromString
mov rbx, rax
test rax, rax
je 0x1400024b5
mov rdx, rax
lea rcx, [0x14000b20c]
call sym.run_w_py3.6_win_amd64.exe_PySys_SetObject
sub qword [rbx], 1
jne 0x1400024b5
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