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

Disassembly:
sub esp, 0x408
mov eax, dword [0x408004]
xor eax, esp
mov dword [esp + 0x404], eax
push ebx
push ebp
push esi
push edi
push 0x608
push 0x4097a0
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 0x401fac
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 0x402027
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 0x40202d
mov ecx, 0x4097a0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401fb4
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jbe 0x401fe8
push 4
push str.__
push 0x4097a0
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x401fe8
mov eax, 1
jmp 0x401fea
xor eax, eax
test eax, eax
mov edx, 0x4097a8
mov ecx, 0x4097a0
cmovne ecx, edx
mov edx, 0x408f60
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x402000
push 0x5c
push 0x408f60
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
add esp, 8
xor ecx, ecx
mov word [eax], cx
jmp 0x40202d
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.004028a0
test eax, eax
jne 0x402082
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 0x4023fd
push 2
push 0
push 0x409180
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push str.python36.dll
mov edi, eax
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x4020f2
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 0x4020eb
push 0
sub esp, 0x14
mov edx, ebx
mov ecx, eax
call fcn.00403020
add esp, 0x18
test eax, eax
je 0x4020eb
mov edx, eax
mov ecx, 0x408228
call fcn.00403fe0
mov ebx, dword [eax]
jmp 0x4020ff
push 0x408228
jmp 0x4020f7
push 0x408218
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x402114
push str.FATAL_ERROR:_Could_not_load_python_library
jmp 0x4023ac
mov edx, str.PyExc_SystemError
mov dword [0x408ed0], ebx
mov ecx, ebx
call fcn.004040d0
mov eax, dword [eax]
mov dword [sym.run_py3.6_win32.exe_PyExc_SystemError], eax
test eax, eax
je 0x4023a7
mov edx, str.PyExc_ImportError
mov ecx, ebx
call fcn.004040d0
mov eax, dword [eax]
mov dword [sym.run_py3.6_win32.exe_PyExc_ImportError], eax
test eax, eax
je 0x4023a7
mov edx, str.PyExc_RuntimeError
mov ecx, ebx
call fcn.004040d0
mov eax, dword [eax]
mov dword [sym.run_py3.6_win32.exe_PyExc_RuntimeError], eax
test eax, eax
je 0x4023a7
mov eax, dword [0x409da8]
cmp dword [eax + 8], 0
je 0x402205
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, str.Py_UnbufferedStdioFlag
mov ecx, ebx
call fcn.004040d0
test eax, eax
je 0x402205
mov dword [eax], 1
mov edx, str.Py_IsolatedFlag
mov ecx, ebx
call fcn.004040d0
test eax, eax
je 0x40221b
mov dword [eax], 1
mov edx, str.Py_NoSiteFlag
mov ecx, ebx
call fcn.004040d0
test eax, eax
je 0x402231
mov dword [eax], 1
mov edx, str.Py_IgnoreEnvironmentFlag
mov ecx, ebx
call fcn.004040d0
test eax, eax
je 0x402247
mov dword [eax], 1
mov edx, str.Py_NoUserSiteDirectory
mov ecx, ebx
call fcn.004040d0
test eax, eax
je 0x40225d
mov dword [eax], 1
mov edx, str.Py_OptimizeFlag
mov ecx, ebx
call fcn.004040d0
test eax, eax
je 0x402278
mov ecx, dword [0x409da8]
mov ecx, dword [ecx + 4]
mov dword [eax], ecx
mov edx, 0x408268
mov ecx, ebx
call fcn.004040d0
mov esi, eax
test esi, esi
je 0x4022b9
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 0x4022b3
push 0x408248
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 0x4022b9
mov dword [esi], 0
mov eax, dword [0x408e80]
test eax, eax
jne 0x4022d7
mov ecx, dword [0x408ed0]
mov edx, str.PyImport_AppendInittab
call fcn.004040d0
mov dword [0x408e80], eax
push 0x404840
push str._memimporter
call eax
mov eax, dword [0x408ec4]
add esp, 8
test eax, eax
jne 0x402304
mov ecx, dword [0x408ed0]
mov edx, str.Py_SetProgramName
call fcn.004040d0
mov dword [0x408ec4], eax
push 0x4097a0
call eax
mov eax, dword [0x408ee4]
add esp, 4
test eax, eax
jne 0x40232c
mov ecx, dword [0x408ed0]
mov edx, str.Py_SetPath
call fcn.004040d0
mov dword [0x408ee4], eax
push 0x409180
call eax
mov eax, dword [0x408eec]
add esp, 4
test eax, eax
jne 0x402354
mov ecx, dword [0x408ed0]
mov edx, str.Py_Initialize
call fcn.004040d0
mov dword [0x408eec], eax
call eax
mov eax, dword [0x408ecc]
test eax, eax
jne 0x402374
mov ecx, dword [0x408ed0]
mov edx, str.PyUnicode_FromString
call fcn.004040d0
mov dword [0x408ecc], eax
push str.console_exe
call eax
mov esi, eax
add esp, 4
test esi, esi
je 0x4023a3
push esi
push 0x40817c
call sym.run_py3.6_win32.exe_PySys_SetObject
add esp, 8
add dword [esi], 0xffffffff
jne 0x4023a3
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x18]
call eax
add esp, 4
xor eax, eax
jmp 0x402415
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.00401073
add esp, 0x408
ret