Function at 0x402ce0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x1678
call fcn.004050b0
sub esp, eax
mov esi, edx
mov eax, dword [esp + eax]
mov dword [esp + 8], 0x40816c
mov edi, eax
lea eax, [esp + 0x5c]
mov dword [esp + 4], 0x44b1c0
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfopen_s]
test eax, eax
je 0x402d28
add esp, 0x167c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x5c]
lea ebx, [esp + 0xe70]
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fread
mov dword [esp], str.maybe_handle_shebang:_read__zd_bytes_n
mov dword [esp + 4], eax
mov ebp, eax
call fcn.00401620
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp ebp, 3
jbe 0x402d80
cmp byte [esp + 0xe73], 0xa
je 0x403150
mov eax, dword [0x406120]
mov ebp, 0x406120
test eax, eax
jne 0x402da6
jmp 0x4032c8
mov eax, dword [ebp + 0xc]
add ebp, 0xc
test eax, eax
je 0x4032c8
mov dword [esp + 8], eax
lea eax, [ebp + 4]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x402d98
mov eax, dword [ebp + 8]
mov dword [esp], str.maybe_handle_shebang:_BOM_found__code_page__u_n
mov dword [esp + 4], eax
call fcn.00401620
mov edx, dword [ebp]
add edx, ebx
lea eax, [edx + 0x800]
mov ebx, edx
jmp 0x402df0
cmp cl, 0xa
je 0x402df8
add ebx, 1
cmp ebx, eax
jae 0x4032b0
movzx ecx, byte [ebx]
cmp cl, 0xd
jne 0x402de0
mov ecx, dword [ebp + 8]
cmp ecx, 0x4b0
je 0x403128
cmp ecx, 0x2ee0
je 0x4032f0
add ebx, 1
sub ebx, edx
cmp ecx, 0x2ee0
jbe 0x403240
cmp ecx, 0x2ee1
je 0x4034d0
cmp ecx, 0xfde9
jne 0x402d19
lea eax, [esp + 0x668]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
sub esp, 0x18
mov ebx, eax
test ebx, ebx
jle 0x402d19
xor ecx, ecx
mov ebp, dword [edi]
xor eax, eax
lea edi, [esp + 0x870]
mov word [esp + ebx*2 + 0x666], cx
mov ecx, 0x180
mov dword [esp + 0x86a], 0
mov dword [esp + 0x86e], 0
mov dword [esp + 0xe6c], 0
rep stosd dword es:[edi], eax
cmp word [esp + 0x668], 0x23
jne 0x4031f0
cmp word [esp + 0x66a], 0x21
jne 0x4031f0
lea edi, [esp + 0x668]
mov edx, edi
movzx eax, word [edx + 4]
test ax, ax
je 0x402d19
add edx, 4
mov dword [esp + 0x38], ebx
mov ebp, dword [sym.imp.msvcrt.dll_isspace]
mov ebx, edx
jmp 0x402f10
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x402d19
mov dword [esp], eax
call ebp
test eax, eax
jne 0x402f00
mov dword [esp + 0x3c], eax
mov edx, ebx
mov eax, dword [str._usr_bin_env_python]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x38]
lea ebx, [edi + ebx*2 - 4]
test eax, eax
je 0x403699
mov edi, 0x406180
mov dword [esp + 0x38], ebx
mov ebx, edx
mov edx, esi
mov esi, edi
mov edi, edx
jmp 0x402f5e
mov eax, dword [esi + 8]
add esi, 8
test eax, eax
je 0x403693
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov dword [esp + 8], eax
mov eax, dword [esi]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x402f50
mov eax, edi
mov edi, esi
mov ebx, dword [esp + 0x38]
mov esi, eax
mov eax, dword [edi + 4]
mov dword [esp + 4], str.python
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_wcsstr
mov dword [esp + 0x38], eax
mov dword [esp + 8], eax
mov eax, dword [edi]
mov dword [esp], str.found_in_builtin_virtual_paths:__s__command:__s_n
mov dword [esp + 4], eax
call fcn.00401620
mov eax, dword [edi]
mov dword [esp + 0x3c], 1
test eax, eax
je 0x4036a9
mov eax, dword [esp + 0x40]
xor edi, edi
cmp ebx, eax
jbe 0x403011
mov dword [esp + 0x48], esi
mov esi, ebx
mov ebx, eax
jmp 0x402ff3
sub esi, 2
cmp esi, ebx
jbe 0x4037a1
movzx eax, word [esi]
mov dword [esp], eax
call ebp
test eax, eax
jne 0x402fe8
mov ebx, esi
mov esi, dword [esp + 0x48]
cmp dword [esp + 0x40], ebx
jae 0x403011
xor eax, eax
mov word [ebx + 2], ax
mov eax, dword [esp + 0x38]
test eax, eax
je 0x402d19
mov eax, dword [esp + 0x38]
mov dword [esp], str.parse_shebang:_found_command:__ls_n
mov dword [esp + 4], eax
call fcn.00401620
mov ebx, dword [esp + 0x3c]
test ebx, ebx
je 0x4038a9
mov eax, dword [esp + 0x38]
mov dword [esp + 4], 0x20
xor ebx, ebx
mov dword [esp], eax
call sub.msvcrt.dll_wcschr
test eax, eax
je 0x403085
xor ecx, ecx
lea ebx, [eax + 2]
mov word [eax], cx
movzx eax, word [eax + 2]
test ax, ax
jne 0x40307c
jmp 0x403085
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x403085
mov dword [esp], eax
call ebp
test eax, eax
jne 0x403070
mov eax, dword [esp + 0x38]
mov dword [esp + 8], 6
mov dword [esp + 4], str.python
mov dword [esp], eax
call sub.msvcrt.dll_wcsncmp
test eax, eax
mov eax, dword [esp + 0x38]
jne 0x403891
mov edx, dword [esp + 0x44]
lea edi, [eax + 0xc]
movzx eax, word [eax + 0xc]
test edx, edx
je 0x403542
test ax, ax
je 0x4030d2
mov dword [esp], eax
call ebp
test eax, eax
je 0x403578
mov dword [esp], str.searching_PATH_for_python_executable_n
call fcn.00401620
mov eax, str.pythonw.exe
call fcn.00402900
test eax, eax
je 0x403526
lea edi, [eax + 0x208]
mov dword [esp], str.Python_on_path:__ls_n
mov dword [esp + 4], edi
call fcn.00401620
mov dword [esp + 4], edi
mov dword [esp], str.located_python_on_PATH:__ls_n
call fcn.00401620
mov ecx, esi
mov edx, ebx
mov eax, edi
call fcn.00402270
lea esi, [esi]
add ebx, 2
sub ebx, edx
test bl, 1
je 0x403347
mov dword [esp + 4], ebx
mov dword [esp], str.UTF_16LE__but_an_odd_number_of_bytes:__d_n
call fcn.00401620
jmp 0x402d19
cmp byte [esp + 0xe72], 0xd
jne 0x402d80
movzx ecx, byte [esp + 0xe71]
mov eax, ecx
movzx ecx, byte [esp + 0xe70]
shl eax, 8
or ecx, eax
movzx eax, word [0x406040]
test ax, ax
je 0x402d80
mov dword [esp + 0x38], esi
mov ebp, 0x406040
mov esi, ecx
jmp 0x4031a8
movzx eax, word [ebp + 0xc]
add ebp, 0xc
test ax, ax
je 0x4035af
cmp si, ax
jb 0x403198
cmp si, word [ebp + 2]
ja 0x403198
xor edx, edx
lea eax, [ebp + 4]
call fcn.00402660
test eax, eax
je 0x403198
mov dword [esp + 4], eax
mov esi, dword [esp + 0x38]
mov dword [esp], str.script_file_is_compiled_against_Python__ls_n
mov dword [esp + 0x38], eax
call fcn.00401620
mov eax, dword [esp + 0x38]
mov ecx, esi
xor edx, edx
add eax, 0xc
call fcn.00402270
lea esi, [esi]
lea edi, [esp + 0x668]
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], str.parse_shebang_called_without_a_valid_shebang__s__for_argv0__s__n
call fcn.00401620
mov dword [esp], ebp
call sub.msvcrt.dll_wcslen
mov edx, edi
sub eax, 1
cmp eax, 0x302
jbe 0x403365
cmp word [edx], 0x23
jne 0x402d19
cmp word [edx + 2], 0x21
jne 0x402d19
jmp 0x402edd
cmp ecx, 0x4b0
je 0x40312d
cmp ecx, 0x4b1
jne 0x402d19
mov dword [esp + 0x38], ebx
test bl, 1
jne 0x4034b4
test ebx, ebx
jle 0x4032a1
lea ecx, [ebx - 2]
lea ebp, [ebx - 1]
and ebp, 0xfffffffe
mov eax, ecx
sub eax, ebp
mov ebp, eax
jmp 0x403283
sub ecx, 2
movzx eax, byte [edx + ebx - 2]
mov byte [esp + ebx + 0x667], al
movzx eax, byte [edx + ebx - 1]
mov byte [esp + ebx + 0x666], al
mov ebx, ecx
cmp ecx, ebp
jne 0x403280
mov eax, dword [esp + 0x38]
shr eax, 1
mov ebx, eax
jmp 0x402e71
mov dword [esp], str.maybe_handle_shebang:_No_line_terminator_found_n
call fcn.00401620
jmp 0x402d19
mov dword [esp], str.maybe_handle_shebang:_BOM_not_found__using_UTF_8_n
mov ebp, 0x406120
call fcn.00401620
lea eax, [esp + 0x1670]
mov edx, ebx
jmp 0x402ddb
add ebx, 4
sub ebx, edx
test bl, 3
jne 0x40349f
mov eax, ebx
shr eax, 0x1f
add eax, ebx
sar eax, 1
mov ecx, eax
test ebx, ebx
jle 0x403340
lea ebp, [edx + ebx - 8]
lea eax, [edx + ebx - 4]
lea edx, [ebx - 1]
lea ecx, [esp + ecx + 0x666]
and edx, 0xfffffffc
sub ebp, edx
lea esi, [esi]
movzx edx, byte [eax + 1]
sub eax, 4
sub ecx, 2
mov byte [ecx + 3], dl
movzx edx, byte [eax + 4]
mov byte [ecx + 2], dl
cmp ebp, eax
jne 0x403328
shr ebx, 1
jmp 0x402e71
lea eax, [esp + 0x668]
mov dword [esp + 8], ebx
shr ebx, 1
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
jmp 0x402e71
mov dword [esp + 8], ebp
lea ebp, [esp + 0x86a]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0x303
mov dword [esp], ebp
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
movzx edx, word [esp + 0x86a]
lea eax, [esp + 0x86c]
test dx, dx
je 0x4033ba
lea esi, [esi]
cmp dx, 0x2f
jne 0x4033af
mov edx, 0x5c
mov word [eax - 2], dx
movzx edx, word [eax]
add eax, 2
test dx, dx
jne 0x4033a0
lea eax, [esp + 0x468]
lea edx, [esp + 0x68]
mov dword [esp + 0x20], 0x100
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x268]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x62]
mov dword [esp + 0xc], edx
mov dword [esp + 0x18], 0x100
mov dword [esp + 0x10], 0x100
mov dword [esp + 8], 3
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [sym.imp.msvcrt.dll__wsplitpath_s]
lea edx, [esp + 0x68]
mov dword [esp], edx
call sub.msvcrt.dll_wcslen
lea edx, [esp + 0x68]
lea eax, [edx + eax*2 - 2]
movzx ecx, word [eax]
cmp cx, 0x5c
jne 0x40342d
movzx ecx, word [eax - 2]
sub eax, 2
cmp eax, edx
jb 0x403453
cmp cx, 0x5c
jne 0x403444
jmp 0x403453
cmp eax, edx
jb 0x403453
sub eax, 2
xor ecx, ecx
cmp word [eax], 0x5c
mov word [eax + 2], cx
jne 0x403440
lea eax, [esp + 0x62]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], str.pythonw.exe
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s_s_s
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x303
mov dword [esp], ebp
call dword [sym.imp.msvcrt.dll__snwprintf_s]
mov dword [esp + 4], ebp
mov dword [esp], str.invented_shebang:__s_n
call fcn.00401620
mov edx, ebp
jmp 0x403223
mov dword [esp + 4], ebx
mov dword [esp], str.UTF_32LE__but_not_divisible_by_4:__d_n
call fcn.00401620
jmp 0x402d19
mov dword [esp + 4], ebx
mov dword [esp], str.maybe_handle_shebang:_UTF_16BE__but_an_odd_number_of_bytes:__d_n
call fcn.00401620
jmp 0x402d19
test bl, 3
jne 0x403563
mov eax, ebx
shr eax, 0x1f
add eax, ebx
sar eax, 1
mov ecx, eax
test ebx, ebx
jle 0x403340
lea ebp, [edx + ebx - 6]
lea eax, [edx + ebx - 2]
lea edx, [ebx - 1]
lea ecx, [esp + ecx + 0x666]
and edx, 0xfffffffc
sub ebp, edx
lea esi, [esi]
nop
movzx edx, byte [eax]
sub eax, 4
sub ecx, 2
mov byte [ecx + 3], dl
movzx edx, byte [eax + 5]
mov byte [ecx + 2], dl
cmp ebp, eax
jne 0x403508
shr ebx, 1
jmp 0x402e71
mov dword [esp + 4], str._not_found_
mov dword [esp], str.Python_on_path:__ls_n
call fcn.00401620
mov eax, dword [esp + 0x38]
movzx eax, word [eax + 0xc]
test ax, ax
jne 0x403578
mov edx, 1
mov eax, edi
call fcn.00402660
test eax, eax
je 0x4035b8
add eax, 0xc
mov ecx, esi
mov edx, ebx
call fcn.00402270
mov dword [esp + 4], ebx
mov dword [esp], str.UTF_32BE__but_not_divisible_by_4:__d_n
call fcn.00401620
jmp 0x402d19
mov dword [esp + 4], edi
mov ebp, edi
mov dword [esp], str.validate_version:_in:__ls_n
call fcn.00401620
mov eax, dword [esp + 0x38]
movzx eax, word [eax + 0xc]
cmp ax, 0x5f
je 0x403639
test ax, ax
jne 0x4035d0
mov dword [esp], str.validate_version:_No_version_number_provided_n
call fcn.00401620
jmp 0x403547
mov esi, dword [esp + 0x38]
jmp 0x402d80
mov dword [esp + 8], edi
mov dword [esp + 4], str.Requested_Python_version___ls__is_not_installed
mov dword [esp], 0x67
call fcn.00401d50
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.msvcrt.dll_iswctype
test eax, eax
jne 0x403603
mov dword [esp + 8], edi
mov dword [esp + 4], str.Invalid_version_specification:__ls._nIn_the_first_line_of_the_script__python_needs_to_be_followed_by_a_valid_version_specifier._nPlease_check_the_documentation.
mov dword [esp], 0x66
call fcn.00401d50
lea esi, [esi]
add ebp, 2
mov dword [esp + 4], 4
movzx eax, word [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_iswctype
test eax, eax
jne 0x403600
movzx eax, word [ebp]
cmp ax, 0x2e
je 0x4037aa
cmp ax, 0x2d
je 0x403660
test ax, ax
jne 0x4035e4
jmp 0x403547
mov edx, dword [esp + 0x38]
cmp word [edx + 0xe], 0x64
jne 0x4035d0
mov dword [esp], str.validate_version:_Windows__d_shebang_n
call fcn.00401620
mov eax, dword [esp + 0x38]
lea ebp, [eax + 0x10]
movzx eax, word [eax + 0x10]
jmp 0x40359c
movzx eax, word [ebp + 2]
cmp ax, 0x33
je 0x403815
cmp ax, 0x36
jne 0x4035e4
cmp word [ebp + 4], 0x34
jne 0x4035e4
cmp word [ebp + 6], 0
je 0x403547
jmp 0x4035e4
mov ebx, dword [esp + 0x38]
mov esi, edi
mov eax, dword [esp + 0x40]
mov dword [esp + 0x44], 0
mov dword [esp + 0x38], eax
mov edx, dword [0x406168]
test edx, edx
je 0x403888
mov ecx, 0x406168
mov dword [esp + 0x48], ebx
mov ebx, edx
mov dword [esp + 0x4c], esi
mov esi, ecx
jmp 0x4036d8
mov ebx, dword [esi + 4]
add esi, 4
test ebx, ebx
je 0x403825
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
mov dword [esp], ebx
mov dword [esp + 8], eax
mov edi, eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x4036ca
mov edx, ebx
add edi, edi
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x48]
cmp word [edx + edi - 2], 0x20
mov esi, dword [esp + 0x4c]
lea ecx, [eax + edi]
je 0x40385d
mov dword [esp], ecx
mov dword [esp + 4], str.__t_r_n
mov dword [esp + 0x48], ecx
call sub.msvcrt.dll_wcspbrk
mov ecx, dword [esp + 0x48]
test eax, eax
mov edi, eax
je 0x403836
movzx edx, word [eax]
mov word [eax], 0
mov eax, ecx
mov dword [esp + 0x48], edx
call fcn.00402a50
mov edx, dword [esp + 0x48]
mov word [edi], dx
test eax, eax
je 0x402fcd
add eax, 0x208
mov dword [esp + 0x38], eax
test dx, dx
jne 0x40377c
jmp 0x403788
movzx edx, word [edi + 2]
add edi, 2
test dx, dx
je 0x403788
movzx edx, dx
mov dword [esp], edx
call ebp
test eax, eax
jne 0x403770
cmp ebx, dword [esp + 0x40]
jbe 0x40301d
mov dword [esp + 0x48], esi
mov esi, ebx
mov ebx, dword [esp + 0x40]
jmp 0x402ff3
mov esi, dword [esp + 0x48]
jmp 0x403011
mov dword [esp + 4], 4
movzx eax, word [ebp + 2]
lea ecx, [ebp + 2]
mov ebp, esi
mov dword [esp + 0x40], ecx
mov dword [esp], eax
call sub.msvcrt.dll_iswctype
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], eax
mov ebx, ecx
jmp 0x4037d9
mov ebx, esi
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4035e4
mov dword [esp + 4], 4
movzx eax, word [ebx + 2]
lea esi, [ebx + 2]
mov dword [esp], eax
call sub.msvcrt.dll_iswctype
test eax, eax
jne 0x4037d7
mov eax, ebp
mov ecx, ebx
mov ebp, esi
mov ebx, dword [esp + 0x3c]
mov esi, eax
movzx eax, word [ecx + 2]
jmp 0x403629
cmp word [ebp + 4], 0x32
jne 0x4035e4
jmp 0x403683
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x40]
jmp 0x40371a
mov eax, ecx
call fcn.00402a50
test eax, eax
je 0x402fcd
add eax, 0x208
mov dword [esp + 0x38], eax
cmp ebx, dword [esp + 0x40]
ja 0x403792
jmp 0x40301d
movzx eax, word [ecx]
mov edi, ecx
test ax, ax
jne 0x403878
jmp 0x40371a
movzx eax, word [edi + 2]
add edi, 2
test ax, ax
je 0x403881
mov dword [esp], eax
call ebp
test eax, eax
jne 0x40386c
mov ecx, edi
jmp 0x40371a
mov ecx, dword [esp + 0x40]
jmp 0x40371a
mov dword [esp + 8], eax
mov dword [esp + 4], str.Unknown_virtual_path__ls
mov dword [esp], 0x66
call fcn.00401d50
mov eax, dword [esp + 0x38]
mov ecx, esi
mov edx, edi
call fcn.00402270
lea esi, [esi]
lea esi, [esi]