Function at 0x140001ad0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
push rbx
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x558]
sub rsp, 0x658
mov rax, qword [0x140009008]
xor rax, rsp
mov qword [rbp + 0x540], rax
movsxd r14, r8d
lea r13, [0x14000a240]
mov rdx, r13
mov r8d, 0x608
xor ecx, ecx
mov r15, r9
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor r12d, r12d
test eax, eax
jne 0x140001bba
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [r12 + 2]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Retrieving_module_name
call fcn.140001010
test ebx, ebx
je 0x140001c36
mov qword [rsp + 0x30], r12
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], r12d
mov r9d, 0x400
mov r8d, ebx
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0x1100
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rdx, qword [rsp + 0x40]
lea rcx, [rbp + 0x140]
mov r8d, 0x400
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [r12 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, [rbp + 0x140]
call fcn.140001010
jmp 0x140001c36
mov rax, 0xffffffffffffffff
inc rax
cmp word [r13 + rax*2], r12w
jne 0x140001bc1
cmp rax, 4
jbe 0x140001bf1
mov r8d, 4
lea rdx, [0x1400063f8]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
mov eax, 1
je 0x140001bf4
mov eax, r12d
test eax, eax
lea rcx, [0x14000a248]
lea rdx, [0x140009a00]
cmove rcx, r13
sub rdx, rcx
nop dword [rax + rax]
movzx eax, word [rcx]
mov word [rcx + rdx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140001c10
mov edx, 0x5c
lea rcx, [0x140009a00]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov word [rax], r12w
lea r8, str.PYTHONSCRIPT
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
test rax, rax
jne 0x140001ce6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 2
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Could_not_locate_script_resource:
call fcn.140001010
test ebx, ebx
je 0x140001d65
mov qword [rsp + 0x30], r12
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], r12d
mov r9d, 0x400
mov r8d, ebx
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0x1100
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rdx, qword [rsp + 0x40]
lea rcx, [rbp + 0x140]
mov r8d, 0x400
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, [rbp + 0x140]
call fcn.140001010
jmp 0x140001d65
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x140001d07
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.Could_not_load_script_resource:
jmp 0x140001d60
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x1400099f0], rax
mov rdx, rax
mov qword [0x14000a848], rax
test rax, rax
jne 0x140001d37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.Could_not_lock_script_resource:
jmp 0x140001d60
cmp dword [rdx], 0x78563412
lea rcx, [rdx + 0x10]
mov eax, dword [rax + 0xc]
mov qword [0x1400099f0], rcx
mov dword [0x1400099ec], eax
je 0x140001dee
lea rdx, str.Bug:_Invalid_script_resource
xor ecx, ecx
call fcn.140001060
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.FATAL_ERROR:_Could_not_locate_script
mov rcx, rax
call fcn.140001010
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
xor edx, edx
mov ecx, 0x1100
mov qword [rsp + 0x20], rax
mov r9d, 0x400
mov r8d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rdx, qword [rsp + 0x40]
lea rcx, [rbp + 0x140]
mov r8d, 0x400
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, [rbp + 0x140]
call fcn.140001010
jmp 0x14000241e
mov qword [rsp + 0x690], rsi
mov rax, 0xffffffffffffffff
mov qword [rsp + 0x650], rdi
inc rax
cmp byte [rcx + rax], r12b
jne 0x140001e05
add rax, 0x11
add rax, rdx
mov qword [0x1400099f0], rax
cmp byte [rcx], r12b
je 0x140001e47
mov qword [rsp + 0x20], rcx
lea r9, [0x140009a00]
lea rcx, [0x140009c20]
mov edx, 0x608
lea r8, str._s_S
call fcn.140001350
jmp 0x140001e5c
mov r8d, 0x608
lea rdx, [0x140009c20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edx, edx
lea rcx, [0x140009c20]
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
lea r8, [0x140006578]
mov edx, 1
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
test rax, rax
je 0x140001ee2
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdx, rsi
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rbx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
je 0x140001ee2
mov edx, esi
mov qword [rsp + 0x38], r12
mov rcx, rax
call fcn.1400029f0
test rax, rax
je 0x140001ee2
mov rdx, rax
lea rcx, [0x140006578]
call fcn.140003300
mov rbx, qword [rax]
jmp 0x140001ef2
lea rcx, [0x140006578]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, qword [rsp + 0x650]
mov rsi, qword [rsp + 0x690]
test rbx, rbx
jne 0x140001f25
lea ecx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.FATAL_ERROR:_Could_not_load_python_library
jmp 0x140001d77
mov r10, qword [0x1400097a8]
mov qword [0x1400098c8], rbx
test r10, r10
je 0x140001f52
nop dword [rax + rax]
cmp rbx, qword [r10]
je 0x140002367
mov r10, qword [r10 + 0x10]
test r10, r10
jne 0x140001f40
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [0x140006ef0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
lea rcx, [0x1400037a0]
cmove rax, rcx
mov rax, qword [rax]
mov qword [sym.run_py3.8_win_amd64.exe_PyExc_SystemError], rax
test rax, rax
je 0x14000240d
lea rdx, [0x140006f08]
mov rcx, rbx
call fcn.1400037e0
mov rcx, qword [rax]
mov qword [sym.run_py3.8_win_amd64.exe_PyExc_ImportError], rcx
test rcx, rcx
je 0x14000240d
lea rdx, [0x140006f20]
mov rcx, rbx
call fcn.1400037e0
mov rcx, qword [rax]
mov qword [sym.run_py3.8_win_amd64.exe_PyExc_RuntimeError], rcx
test rcx, rcx
je 0x14000240d
mov rcx, rbx
call fcn.1400016c0
mov rax, qword [0x140009818]
test rax, rax
jne 0x140002001
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006b98]
call fcn.1400037e0
mov qword [0x140009818], rax
lea rdx, [0x140003ee0]
lea rcx, str._memimporter
call rax
mov rax, qword [0x140009908]
test rax, rax
jne 0x140002037
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006dc0]
call fcn.1400037e0
mov qword [0x140009908], rax
lea rcx, [rbp - 0x30]
call rax
mov rax, qword [0x140009980]
mov dword [rbp + 0x60], r12d
mov dword [rbp + 0x20], r12d
mov dword [rbp + 0xc8], 1
test rax, rax
jne 0x140002075
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006de0]
call fcn.1400037e0
mov qword [0x140009980], rax
mov r8, r14
lea rdx, [rbp - 0x30]
mov r9, r15
lea rcx, [rbp - 0x50]
call rax
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm0
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x50], xmm1
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmm0, xmmword [rax]
mov rax, qword [0x140009948]
movaps xmmword [rsp + 0x70], xmm0
test rax, rax
jne 0x1400020da
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e28]
call fcn.1400037e0
movaps xmm0, xmmword [rsp + 0x70]
movaps xmm1, xmmword [rsp + 0x50]
mov qword [0x140009948], rax
lea rcx, [rsp + 0x50]
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
call rax
test eax, eax
jne 0x140002398
mov rax, qword [0x140009978]
test rax, rax
jne 0x140002119
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006df8]
call fcn.1400037e0
mov qword [0x140009978], rax
mov r9, r13
lea r8, [rbp + 0x38]
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x50]
call rax
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm0
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm1
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmm0, xmmword [rax]
mov rax, qword [0x140009948]
movaps xmmword [rsp + 0x50], xmm0
test rax, rax
jne 0x14000217f
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e28]
call fcn.1400037e0
movaps xmm0, xmmword [rsp + 0x50]
movaps xmm1, xmmword [rsp + 0x70]
mov qword [0x140009948], rax
lea rcx, [rsp + 0x50]
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
call rax
test eax, eax
jne 0x140002398
mov rax, qword [0x140009870]
test rax, rax
jne 0x1400021be
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e78]
call fcn.1400037e0
mov qword [0x140009870], rax
lea r8, [0x140009c20]
lea rdx, [rbp + 0xd0]
lea rcx, [rbp - 0x50]
call rax
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm0
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm1
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmm0, xmmword [rax]
mov rax, qword [0x140009948]
movaps xmmword [rsp + 0x50], xmm0
test rax, rax
jne 0x140002227
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e28]
call fcn.1400037e0
movaps xmm0, xmmword [rsp + 0x50]
movaps xmm1, xmmword [rsp + 0x70]
mov qword [0x140009948], rax
lea rcx, [rsp + 0x50]
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
call rax
test eax, eax
jne 0x140002398
mov rax, qword [0x1400097e0]
test rax, rax
jne 0x140002266
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e60]
call fcn.1400037e0
mov qword [0x1400097e0], rax
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x50]
call rax
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm0
movups xmm0, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm1
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmm0, xmmword [rax]
mov rax, qword [0x140009948]
movaps xmmword [rsp + 0x50], xmm0
test rax, rax
jne 0x1400022c5
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e28]
call fcn.1400037e0
movaps xmm0, xmmword [rsp + 0x50]
movaps xmm1, xmmword [rsp + 0x70]
mov qword [0x140009948], rax
lea rcx, [rsp + 0x50]
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
call rax
test eax, eax
jne 0x140002398
mov rax, qword [0x1400098d0]
test rax, rax
jne 0x140002304
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e50]
call fcn.1400037e0
mov qword [0x1400098d0], rax
lea rcx, [rbp - 0x30]
call rax
lea rcx, str.console_exe
call sym.run_py3.8_win_amd64.exe_PyUnicode_FromString
mov rbx, rax
test rax, rax
je 0x140002360
mov rax, qword [0x1400098e8]
test rax, rax
jne 0x140002344
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e90]
call fcn.1400037e0
mov qword [0x1400098e8], rax
mov rdx, rbx
lea rcx, [0x140006620]
call rax
sub qword [rbx], 1
jne 0x140002360
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
xor eax, eax
jmp 0x140002423
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.1400032e0
mov rcx, qword [r10]
lea rdx, [0x140006ef0]
call fcn.140003050
jmp 0x140001f7c
mov rax, qword [0x1400098d0]
test rax, rax
jne 0x1400023be
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e50]
call fcn.1400037e0
mov qword [0x1400098d0], rax
lea rcx, [rbp - 0x30]
call rax
mov rax, qword [0x140009988]
test rax, rax
jne 0x1400023ea
mov rcx, qword [0x1400098c8]
lea rdx, [0x140006e40]
call fcn.1400037e0
mov qword [0x140009988], rax
movups xmm0, xmmword [rsp + 0x40]
lea rcx, [rsp + 0x50]
movaps xmmword [rsp + 0x50], xmm0
movups xmm0, xmmword [rbp - 0x80]
movaps xmmword [rsp + 0x60], xmm0
call rax
test eax, eax
je 0x140002444
mov eax, dword [rbp - 0x58]
jmp 0x140002423
lea rdx, str.FATAL_ERROR:_Failed_to_load_some_Python_symbols
mov ecx, 0xffffffff
call fcn.140001060
mov eax, 0xffffffff
mov rcx, qword [rbp + 0x540]
xor rcx, rsp
call fcn.1400051c0
add rsp, 0x658
pop r15
pop r14
pop r13
pop r12
pop rbx
pop rbp
ret
movups xmm0, xmmword [rsp + 0x40]
lea rcx, [rbp - 0x70]
movaps xmmword [rbp - 0x70], xmm0
movups xmm0, xmmword [rbp - 0x80]
movaps xmmword [rbp - 0x60], xmm0
call sym.run_py3.8_win_amd64.exe_Py_ExitStatusException
int3