Function at 0x402340
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405e86
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x2a8], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2ac], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
lea esi, [edx + 2]
nop dword [eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x402390
sub edx, esi
lea esi, [edi + 0x24]
sar edx, 1
mov ecx, esi
push edx
push eax
call fcn.004038a0
cmp dword [esi + 0x14], 7
jbe 0x4023b3
mov esi, dword [esi]
lea eax, [ebp - 0x2b8]
push eax
push esi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x2bc], eax
test eax, eax
jne 0x4023fc
push eax
push 0x4061ec
push str.Error_in_CommandLineToArgvW__
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404090
mov esp, ebp
pop ebp
ret 4
push dword [ebp - 0x2b8]
lea ecx, [edi + 0x9c]
call fcn.00403a90
xor esi, esi
cmp dword [ebp - 0x2b8], esi
jle 0x402474
xor edi, edi
nop dword [eax]
mov edx, dword [ebp - 0x2bc]
mov eax, dword [ebp - 0x2a8]
mov edx, dword [edx + esi*4]
mov ecx, dword [eax + 0x9c]
add ecx, edi
lea eax, [edx + 2]
mov dword [ebp - 0x2b0], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x402440
sub edx, dword [ebp - 0x2b0]
mov eax, dword [ebp - 0x2bc]
sar edx, 1
push edx
push dword [eax + esi*4]
call fcn.004038a0
inc esi
add edi, 0x18
cmp esi, dword [ebp - 0x2b8]
jl 0x402420
mov edi, dword [ebp - 0x2a8]
push dword [ebp - 0x2bc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x22c]
push eax
push 0x105
call esi
lea ecx, [ebp - 0x22c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4024a0
sub ecx, edx
lea eax, [ebp - 0x22c]
sar ecx, 1
add edi, 0xc
push ecx
push eax
mov ecx, edi
call fcn.004038a0
push 0x105
lea eax, [ebp - 0x22c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x22c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4024e0
sub ecx, edx
lea eax, [ebp - 0x22c]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x2a8]
push eax
lea ecx, [ecx + 0x3c]
call fcn.004038a0
lea ecx, [ebp - 0x22c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402510
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x402545
lea eax, [ebp + ecx*2 - 0x22e]
nop word [eax + eax]
movzx edx, word [eax]
cmp edx, 0x2f
je 0x402545
cmp edx, 0x5c
je 0x402545
dec ecx
sub eax, 2
test ecx, ecx
jg 0x402530
add ecx, ecx
cmp ecx, 0x21c
jae 0x402b8b
xor eax, eax
mov word [ebp + ecx - 0x22c], ax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x22c]
push eax
push 0x105
call esi
lea ecx, [ebp - 0x22c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402581
mov esi, dword [ebp - 0x2a8]
lea eax, [ebp - 0x22c]
sub ecx, edx
add esi, 0x6c
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004038a0
cmp dword [edi + 0x14], 7
jbe 0x4025b0
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0x2ac]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4025c0
sub ecx, edx
mov edi, 0x7ffffffe
sar ecx, 1
cmp ecx, 3
jb 0x402622
mov ecx, dword [ebp - 0x2ac]
cmp word [ecx + 2], 0x3a
jne 0x402622
movzx eax, word [ecx + 4]
cmp eax, 0x2f
je 0x4025f4
cmp eax, 0x5c
jne 0x402622
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4025f7
mov esi, dword [ebp - 0x2a8]
sub ecx, edx
sar ecx, 1
add esi, 0x54
push ecx
push dword [ebp - 0x2ac]
mov ecx, esi
call fcn.004038a0
jmp 0x40278d
mov ecx, dword [esi + 0x10]
mov eax, edi
sub eax, ecx
cmp eax, 1
jb 0x402b90
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x40263c
mov eax, dword [esi]
push 1
push 0x406170
push ecx
push eax
push esi
push dword [ebp - 0x2b0]
lea ecx, [ebp - 0x2a4]
call fcn.00401bc0
mov esi, dword [ebp - 0x2ac]
mov ecx, esi
mov dword [ebp - 4], 0
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402670
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x2a4]
call fcn.00403830
mov esi, dword [ebp - 0x2a8]
xor ecx, ecx
add esi, 0x54
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x23c], xmm0
movups xmmword [ebp - 0x28c], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea eax, [ebp - 0x28c]
movq qword [ebp - 0x2b4], xmm0
movq qword [ebp - 0x27c], xmm0
cmp esi, eax
je 0x402706
mov ecx, esi
call fcn.00401f10
movups xmm0, xmmword [ebp - 0x23c]
xor eax, eax
mov ecx, 7
mov word [ebp - 0x28c], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x2b4]
movq qword [esi + 0x10], xmm0
jmp 0x40270c
mov ecx, dword [ebp - 0x278]
cmp ecx, 7
jbe 0x402746
mov edx, dword [ebp - 0x28c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40273c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b95
push ecx
push edx
call fcn.004040d3
add esp, 8
mov ecx, dword [ebp - 0x290]
mov dword [ebp - 4], 0xffffffff
cmp ecx, 7
jbe 0x40278d
mov edx, dword [ebp - 0x2a4]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402783
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b95
push ecx
push edx
call fcn.004040d3
add esp, 8
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x402797
mov eax, dword [esi]
push 0
lea ecx, [ebp - 0x22c]
push ecx
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea ecx, [ebp - 0x22c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4027b5
sub ecx, edx
lea eax, [ebp - 0x22c]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004038a0
push esi
lea ecx, [ebp - 0x25c]
call fcn.00401ac0
cmp dword [ebp - 0x248], 7
lea eax, [ebp - 0x25c]
mov dword [ebp - 4], 1
cmova eax, dword [ebp - 0x25c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402913
mov ecx, dword [ebp - 0x24c]
sub edi, ecx
cmp edi, 0x1d
jb 0x402b9a
cmp dword [ebp - 0x248], 7
lea eax, [ebp - 0x25c]
push ecx
cmova eax, dword [ebp - 0x25c]
lea ecx, [ebp - 0x244]
push eax
push 0x1d
push str.Missing_embedded_Python3_in:_n
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x2b0]
call fcn.00401bc0
cmp dword [ebp - 0x230], 7
lea eax, [ebp - 0x244]
push 0
cmova eax, dword [ebp - 0x244]
push str.ERROR
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x230]
cmp ecx, 7
jbe 0x4028b3
mov edx, dword [ebp - 0x244]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4028a9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b9f
push ecx
push edx
call fcn.004040d3
add esp, 8
xor eax, eax
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 7
mov word [ebp - 0x244], ax
mov ecx, dword [ebp - 0x248]
cmp ecx, 7
jbe 0x4023dd
mov edx, dword [ebp - 0x25c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a98
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b9f
jmp 0x402a98
mov ecx, dword [esi + 0x10]
mov eax, edi
sub eax, ecx
cmp eax, 0xc
jb 0x402ba4
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x40292d
mov eax, dword [esi]
push 0xc
push 0x40625c
push ecx
push eax
push esi
push dword [ebp - 0x2b0]
lea ecx, [ebp - 0x274]
call fcn.00401bc0
cmp dword [ebp - 0x260], 7
lea eax, [ebp - 0x274]
mov byte [ebp - 4], 2
cmova eax, dword [ebp - 0x274]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402aa7
mov ecx, dword [ebp - 0x24c]
sub edi, ecx
cmp edi, 0x19
jb 0x402ba9
cmp dword [ebp - 0x248], 7
lea eax, [ebp - 0x25c]
push ecx
cmova eax, dword [ebp - 0x25c]
lea ecx, [ebp - 0x244]
push eax
push 0x19
push str.Missing_python3.dll_in:_r_n
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x2b0]
call fcn.00401bc0
cmp dword [ebp - 0x230], 7
lea eax, [ebp - 0x244]
push 0
cmova eax, dword [ebp - 0x244]
push str.ERROR
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x230]
cmp ecx, 7
jbe 0x402a19
mov edx, dword [ebp - 0x244]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a0f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b9f
push ecx
push edx
call fcn.004040d3
add esp, 8
mov ecx, dword [ebp - 0x260]
xor eax, eax
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 7
mov word [ebp - 0x244], ax
cmp ecx, 7
jbe 0x402a76
mov edx, dword [ebp - 0x274]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a6c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b9f
push ecx
push edx
call fcn.004040d3
add esp, 8
xor eax, eax
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 7
mov word [ebp - 0x274], ax
jmp 0x4028d0
push ecx
push edx
call fcn.004040d3
add esp, 8
jmp 0x4023dd
mov edi, dword [ebp - 0x2a8]
cmp dword [edi + 0x50], 7
lea eax, [edi + 0x3c]
jbe 0x402ab8
mov eax, dword [eax]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push eax
push str.PYSTAND
call esi
cmp dword [edi + 0x80], 7
lea eax, [edi + 0x6c]
jbe 0x402ad4
mov eax, dword [eax]
push eax
push str.PYSTAND_HOME
call esi
cmp dword [edi + 0x68], 7
lea eax, [edi + 0x54]
jbe 0x402ae7
mov eax, dword [eax]
push eax
push str.PYSTAND_RUNTIME
call esi
mov ecx, dword [ebp - 0x260]
cmp ecx, 7
jbe 0x402b2b
mov edx, dword [ebp - 0x274]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402b21
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b9f
push ecx
push edx
call fcn.004040d3
add esp, 8
mov ecx, dword [ebp - 0x248]
xor eax, eax
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 7
mov word [ebp - 0x274], ax
cmp ecx, 7
jbe 0x402b84
mov edx, dword [ebp - 0x25c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402b7a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b9f
push ecx
push edx
call fcn.004040d3
add esp, 8
mov al, 1
jmp 0x4023df
call fcn.00404203
call fcn.00403810
call fcn.00404d50
call fcn.00403810
call fcn.00404d50
call fcn.00403810
call fcn.00403810
int3