Function at 0x4014c0
Capabilities:
Compiled with py2exe
Extract resource via kernel32 functions
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x548
mov eax, dword [0x408004]
xor eax, esp
mov dword [esp + 0x544], eax
mov eax, dword [ebp + 8]
push esi
push edi
push 0x608
push 0x408dc0
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0xc]
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401516
call esi
mov edx, str.Retrieving_module_name
mov ecx, eax
call fcn.00401050
jmp 0x401595
mov ecx, 0x408dc0
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401520
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jbe 0x401554
push 4
push 0x4051fc
push 0x408dc0
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x401554
mov eax, 1
jmp 0x401556
xor eax, eax
test eax, eax
mov edx, 0x408dc8
mov ecx, 0x408dc0
cmovne ecx, edx
mov edx, 0x408580
sub edx, ecx
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x401570
push 0x5c
push 0x408580
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
add esp, 8
xor ecx, ecx
mov word [eax], cx
push str.PYTHONSCRIPT
push 1
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, 0x400
test eax, eax
jne 0x4015c6
call esi
mov edx, str.Could_not_locate_script_resource:
mov ecx, eax
call fcn.00401050
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x401685
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4015ec
call esi
mov edx, str.Could_not_load_script_resource:
mov ecx, eax
call fcn.00401050
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x401685
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, eax
mov dword [0x408574], edx
mov dword [0x4093c8], edx
test edx, edx
jne 0x40161b
call esi
mov edx, str.Could_not_lock_script_resource:
mov ecx, eax
call fcn.00401050
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x401685
cmp dword [edx], 0x78563412
lea esi, [edx + 0x10]
mov eax, dword [edx + 0xc]
mov dword [0x408570], eax
mov dword [0x408574], esi
je 0x40171a
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [esp + 0x148]
push eax
mov byte [esp + 0x14c], 0
call esi
mov ecx, edi
sub ecx, eax
push str.Bug:_Invalid_script_resource
push ecx
lea ecx, [esp + 0x150]
add eax, ecx
push eax
call fcn.00401010
add esp, 0xc
lea eax, [esp + 0x148]
push 0x10
push 0
push eax
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0x400
push 0xffffffffffffffff
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x400
push dword [esp + 0x18]
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [esp + 0x148]
push eax
call esi
sub edi, eax
lea ecx, [esp + 0x148]
push str.FATAL_ERROR:_Could_not_locate_script
add eax, ecx
push edi
push eax
call fcn.00401010
add esp, 0xc
lea eax, [esp + 0x148]
push 0x10
push 0
push eax
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x544]
xor ecx, esp
call fcn.00403ae0
mov esp, ebp
pop ebp
ret
mov ecx, esi
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401720
sub ecx, edi
lea eax, [edx + 0x11]
add eax, ecx
cmp byte [esi], 0
mov dword [0x408574], eax
je 0x401757
push esi
push 0x408580
push str._s_S
push 0x608
push 0x4087a0
call fcn.004012d0
add esp, 0x14
jmp 0x401769
push 0x608
push 0x4087a0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 2
push 0
push 0x4087a0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push 0x405368
mov edi, eax
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4017f2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push dword [esp + 0x14]
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x4017df
mov edx, dword [esp + 0x14]
mov ecx, eax
push 0
sub esp, 0x14
call fcn.00402080
add esp, 0x18
test eax, eax
je 0x4017df
mov edx, eax
mov ecx, 0x405368
call fcn.00402690
mov esi, dword [eax]
mov dword [esp + 0x14], esi
jmp 0x401803
push 0x405368
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x401803
push 0x405368
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov dword [esp + 0x14], eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
jne 0x401818
mov edx, str.FATAL_ERROR:_Could_not_load_python_library
jmp 0x401c94
mov edx, 0x405c2c
mov dword [0x4084dc], esi
mov ecx, esi
call fcn.00402a60
mov eax, dword [eax]
mov dword [sym.run_w_py3.8_win32.exe_PyExc_SystemError], eax
test eax, eax
je 0x401c8f
mov edx, 0x405c40
mov ecx, esi
call fcn.00402a60
mov eax, dword [eax]
mov dword [sym.run_w_py3.8_win32.exe_PyExc_ImportError], eax
test eax, eax
je 0x401c8f
mov edx, 0x405c54
mov ecx, esi
call fcn.00402a60
mov eax, dword [eax]
mov dword [sym.run_w_py3.8_win32.exe_PyExc_RuntimeError], eax
test eax, eax
je 0x401c8f
mov eax, dword [0x4093c8]
cmp dword [eax + 8], 0
je 0x401921
push 0x8000
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
push eax
call edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
add esp, 4
push eax
call esi
add esp, 8
push 0x8000
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call edi
add esp, 4
push eax
call esi
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 8
push 0
push 4
push 0
push 0
call edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_setvbuf]
add esp, 4
push eax
call esi
add esp, 0x10
push 0
push 4
push 0
push 1
call edi
add esp, 4
push eax
call esi
add esp, 0x10
push 0
push 4
push 0
push 2
call edi
add esp, 4
push eax
call esi
mov esi, dword [esp + 0x24]
add esp, 0x10
mov edx, 0x4052cc
mov ecx, esi
call fcn.00402a60
test eax, eax
je 0x401921
mov dword [eax], 1
mov edx, 0x4052e4
mov ecx, esi
call fcn.00402a60
test eax, eax
je 0x401937
mov dword [eax], 1
mov edx, 0x4052f4
mov ecx, esi
call fcn.00402a60
test eax, eax
je 0x40194d
mov dword [eax], 1
mov edx, 0x405304
mov ecx, esi
call fcn.00402a60
test eax, eax
je 0x401963
mov dword [eax], 1
mov edx, 0x405320
mov ecx, esi
call fcn.00402a60
test eax, eax
je 0x401979
mov dword [eax], 1
mov edx, 0x405338
mov ecx, esi
call fcn.00402a60
test eax, eax
je 0x401994
mov ecx, dword [0x4093c8]
mov ecx, dword [ecx + 4]
mov dword [eax], ecx
mov edx, 0x405348
mov ecx, esi
call fcn.00402a60
mov esi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
test edi, edi
je 0x4019d8
push str.PY2EXE_VERBOSE
call esi
add esp, 4
test eax, eax
je 0x4019d2
push str.PY2EXE_VERBOSE
call esi
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [edi], eax
jmp 0x4019d8
mov dword [edi], 0
mov eax, dword [0x408484]
test eax, eax
jne 0x4019f6
mov ecx, dword [0x4084dc]
mov edx, 0x40590c
call fcn.00402a60
mov dword [0x408484], eax
push 0x4031b0
push str._memimporter
call eax
mov eax, dword [0x4084fc]
add esp, 8
test eax, eax
jne 0x401a23
mov ecx, dword [0x4084dc]
mov edx, 0x405b10
call fcn.00402a60
mov dword [0x4084fc], eax
lea ecx, [esp + 0x58]
push ecx
call eax
mov eax, dword [0x4093c8]
add esp, 4
mov dword [esp + 0xbc], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x108], 1
mov dword [esp + 0xe8], 0
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], 0
mov dword [esp + 0xe0], 0
mov eax, dword [eax + 4]
push str.PY2EXE_VERBOSE
mov dword [esp + 0xd0], eax
call esi
add esp, 4
test eax, eax
je 0x401aae
push str.PY2EXE_VERBOSE
call esi
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [esp + 0xd8], eax
jmp 0x401ab9
mov dword [esp + 0xd8], 0
mov eax, dword [0x408538]
test eax, eax
jne 0x401ad7
mov ecx, dword [0x4084dc]
mov edx, 0x405b2c
call fcn.00402a60
mov dword [0x408538], eax
push dword [esp + 0x18]
lea ecx, [esp + 0x5c]
push dword [esp + 0x20]
push ecx
lea ecx, [esp + 0x54]
push ecx
call eax
add esp, 0x10
movups xmm0, xmmword [eax]
mov eax, dword [0x40851c]
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x30], xmm0
test eax, eax
jne 0x401b1e
mov ecx, dword [0x4084dc]
mov edx, 0x405b6c
call fcn.00402a60
movaps xmm0, xmmword [esp + 0x20]
mov dword [0x40851c], eax
sub esp, 0x10
mov ecx, esp
movups xmmword [ecx], xmm0
call eax
add esp, 0x10
test eax, eax
jne 0x401c39
push 0x408dc0
lea eax, [esp + 0xac]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x54]
push eax
call sym.run_w_py3.8_win32.exe_PyConfig_SetString
mov ecx, esp
movups xmm0, xmmword [eax]
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x40], xmm0
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call sym.run_w_py3.8_win32.exe_PyStatus_Exception
add esp, 0x10
test eax, eax
jne 0x401c39
push 0x4087a0
lea eax, [esp + 0x110]
push eax
lea eax, [esp + 0x50]
push eax
call sym.run_w_py3.8_win32.exe_PyWideStringList_Append
push ecx
mov ecx, esp
movups xmm0, xmmword [eax]
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x40], xmm0
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call sym.run_w_py3.8_win32.exe_PyStatus_Exception
add esp, 0x10
test eax, eax
jne 0x401c39
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x4c]
push eax
call sym.run_w_py3.8_win32.exe_Py_InitializeFromConfig
sub esp, 8
mov ecx, esp
movups xmm0, xmmword [eax]
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x40], xmm0
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call sym.run_w_py3.8_win32.exe_PyStatus_Exception
add esp, 0x10
test eax, eax
jne 0x401c39
lea eax, [esp + 0x58]
push eax
call sym.run_w_py3.8_win32.exe_PyConfig_Clear
add esp, 4
push str.windows_exe
call sym.run_w_py3.8_win32.exe_PyUnicode_FromString
mov esi, eax
add esp, 4
test esi, esi
je 0x401c23
push esi
push 0x40540c
call sym.run_w_py3.8_win32.exe_PySys_SetObject
add esp, 8
add dword [esi], 0xffffffff
jne 0x401c23
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x544]
xor ecx, esp
call fcn.00403ae0
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4084e0]
test eax, eax
jne 0x401c57
mov ecx, dword [0x4084dc]
mov edx, 0x405b90
call fcn.00402a60
mov dword [0x4084e0], eax
lea ecx, [esp + 0x58]
push ecx
call eax
movaps xmm0, xmmword [esp + 0x24]
sub esp, 0xc
mov eax, esp
movups xmmword [eax], xmm0
call sym.run_w_py3.8_win32.exe_PyStatus_IsExit
add esp, 0x10
test eax, eax
je 0x401cb3
mov eax, dword [esp + 0x3c]
pop edi
pop esi
mov ecx, dword [esp + 0x544]
xor ecx, esp
call fcn.00403ae0
mov esp, ebp
pop ebp
ret
mov edx, str.FATAL_ERROR:_Failed_to_load_some_Python_symbols
or ecx, 0xffffffff
call fcn.00401050
mov ecx, dword [esp + 0x54c]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, esp
call fcn.00403ae0
mov esp, ebp
pop ebp
ret
movaps xmm0, xmmword [esp + 0x20]
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call sym.run_w_py3.8_win32.exe_Py_ExitStatusException
int3