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

Disassembly:
sub esp, 0x408
mov eax, dword [0x407004]
xor eax, esp
mov dword [esp + 0x404], eax
push ebx
push ebp
push esi
push edi
push 0x608
push 0x407da0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
test eax, eax
jne 0x40158c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Retrieving_module_name
push 2
mov esi, eax
call ebp
add esp, 4
push eax
call fcn.00401010
add esp, 8
test esi, esi
je 0x401607
push 0
push 0
lea eax, [esp + 0x18]
push eax
push 0x400
push esi
push 0
push 0x1100
call ebx
push 0x400
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 0xc
push dword [esp + 0x10]
call esi
lea eax, [esp + 0x14]
push eax
push 2
call ebp
add esp, 4
push eax
call fcn.00401010
add esp, 8
jmp 0x40160d
mov ecx, 0x407da0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401594
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jbe 0x4015c8
push 4
push 0x4051ec
push 0x407da0
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x4015c8
mov eax, 1
jmp 0x4015ca
xor eax, eax
test eax, eax
mov edx, 0x407da8
mov ecx, 0x407da0
cmovne ecx, edx
mov edx, 0x407560
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x4015e0
push 0x5c
push 0x407560
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
add esp, 8
xor ecx, ecx
mov word [eax], cx
jmp 0x40160d
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.00401140
test eax, eax
jne 0x401662
push str.FATAL_ERROR:_Could_not_locate_script
push 2
call ebp
add esp, 4
push eax
call fcn.00401010
add esp, 8
lea eax, [esp + 0x10]
push 0
push 0
push eax
push 0x400
push 0xffffffffffffffff
push 0
push 0x1100
call ebx
push 0x400
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
call edi
add esp, 0xc
push dword [esp + 0x10]
call esi
jmp 0x4019d6
push 2
push 0
push 0x407780
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push 0x405358
mov edi, eax
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x4016cb
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x4016cb
push 0
sub esp, 0x14
mov edx, ebx
mov ecx, eax
call fcn.00401f80
add esp, 0x18
test eax, eax
je 0x4016cb
mov edx, eax
mov ecx, 0x405358
call fcn.00402590
mov ebx, dword [eax]
jmp 0x4016d8
push 0x405358
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x4016ed
push str.FATAL_ERROR:_Could_not_load_python_library
jmp 0x401985
mov edx, 0x405b44
mov dword [0x4074d4], ebx
mov ecx, ebx
call fcn.00402960
mov eax, dword [eax]
mov dword [sym.run_py3.8_win32.exe_PyExc_SystemError], eax
test eax, eax
je 0x401980
mov edx, 0x405b58
mov ecx, ebx
call fcn.00402960
mov eax, dword [eax]
mov dword [sym.run_py3.8_win32.exe_PyExc_ImportError], eax
test eax, eax
je 0x401980
mov edx, 0x405b6c
mov ecx, ebx
call fcn.00402960
mov eax, dword [eax]
mov dword [sym.run_py3.8_win32.exe_PyExc_RuntimeError], eax
test eax, eax
je 0x401980
mov eax, dword [0x4083a8]
cmp dword [eax + 8], 0
je 0x4017de
push 0x8000
push 0
call ebp
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
push eax
call edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
add esp, 8
push eax
call esi
add esp, 8
push 0x8000
push 1
call ebp
push eax
call edi
add esp, 8
push eax
call esi
add esp, 8
push 0
push 4
push 0
push 0
call ebp
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 ebp
add esp, 4
push eax
call esi
add esp, 0x10
push 0
push 4
push 0
push 2
call ebp
add esp, 4
push eax
call esi
add esp, 0x10
mov edx, 0x4052bc
mov ecx, ebx
call fcn.00402960
test eax, eax
je 0x4017de
mov dword [eax], 1
mov edx, 0x4052d4
mov ecx, ebx
call fcn.00402960
test eax, eax
je 0x4017f4
mov dword [eax], 1
mov edx, 0x4052e4
mov ecx, ebx
call fcn.00402960
test eax, eax
je 0x40180a
mov dword [eax], 1
mov edx, 0x4052f4
mov ecx, ebx
call fcn.00402960
test eax, eax
je 0x401820
mov dword [eax], 1
mov edx, 0x405310
mov ecx, ebx
call fcn.00402960
test eax, eax
je 0x401836
mov dword [eax], 1
mov edx, 0x405328
mov ecx, ebx
call fcn.00402960
test eax, eax
je 0x401851
mov ecx, dword [0x4083a8]
mov ecx, dword [ecx + 4]
mov dword [eax], ecx
mov edx, 0x405338
mov ecx, ebx
call fcn.00402960
mov esi, eax
test esi, esi
je 0x401892
mov edi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push str.PY2EXE_VERBOSE
call edi
add esp, 4
test eax, eax
je 0x40188c
push str.PY2EXE_VERBOSE
call edi
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 8
mov dword [esi], eax
jmp 0x401892
mov dword [esi], 0
mov eax, dword [0x407480]
test eax, eax
jne 0x4018b0
mov ecx, dword [0x4074d4]
mov edx, 0x4058fc
call fcn.00402960
mov dword [0x407480], eax
push 0x403080
push str._memimporter
call eax
mov eax, dword [0x4074c8]
add esp, 8
test eax, eax
jne 0x4018dd
mov ecx, dword [0x4074d4]
mov edx, 0x40585c
call fcn.00402960
mov dword [0x4074c8], eax
push 0x407da0
call eax
mov eax, dword [0x4074e8]
add esp, 4
test eax, eax
jne 0x401905
mov ecx, dword [0x4074d4]
mov edx, 0x40580c
call fcn.00402960
mov dword [0x4074e8], eax
push 0x407780
call eax
mov eax, dword [0x4074f0]
add esp, 4
test eax, eax
jne 0x40192d
mov ecx, dword [0x4074d4]
mov edx, 0x405824
call fcn.00402960
mov dword [0x4074f0], eax
call eax
mov eax, dword [0x4074d0]
test eax, eax
jne 0x40194d
mov ecx, dword [0x4074d4]
mov edx, 0x405a04
call fcn.00402960
mov dword [0x4074d0], eax
push str.console_exe
call eax
mov esi, eax
add esp, 4
test esi, esi
je 0x40197c
push esi
push 0x4053fc
call sym.run_py3.8_win32.exe_PySys_SetObject
add esp, 8
add dword [esi], 0xffffffff
jne 0x40197c
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
xor eax, eax
jmp 0x4019ee
push str.FATAL_ERROR:_Failed_to_load_some_Python_symbols
push 2
call ebp
add esp, 4
push eax
call fcn.00401010
add esp, 8
lea eax, [esp + 0x10]
push 0
push 0
push eax
mov eax, dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x400
push 0xffffffffffffffff
push 0
push 0x1100
call eax
push 0x400
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
call eax
mov eax, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 0xc
push dword [esp + 0x10]
call eax
lea eax, [esp + 0x14]
push eax
push 2
call ebp
add esp, 4
push eax
call fcn.00401010
add esp, 8
or eax, 0xffffffff
mov ecx, dword [esp + 0x414]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00403770
add esp, 0x408
ret