Function at 0x4027b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x423b50
push dword [ecx]
lea eax, [ebp - 0x318]
mov dword [ebp - 0x314], edx
push eax
call fcn.0040cc14
add esp, 0xc
test eax, eax
jne 0x4029f2
push esi
push edi
push dword [ebp - 0x318]
lea eax, [ebp - 0x104]
push 0x100
push 1
push eax
call fcn.0040df9b
mov esi, eax
push esi
push str.maybe_handle_shebang:_read__zd_bytes_n
call fcn.00401130
push dword [ebp - 0x318]
call fcn.0040cd80
add esp, 0x1c
cmp esi, 4
jb 0x4028aa
cmp byte [ebp - 0x101], 0xa
jne 0x4028aa
cmp byte [ebp - 0x102], 0xd
jne 0x4028aa
movzx ecx, byte [ebp - 0x103]
xor edi, edi
movzx eax, byte [ebp - 0x104]
shl cx, 8
or cx, ax
movzx eax, cx
mov cx, word [0x427910]
mov dword [ebp - 0x310], eax
test cx, cx
je 0x4028aa
movzx edx, cx
mov esi, 0x427914
nop dword [eax]
cmp ax, dx
jb 0x402894
cmp ax, word [esi - 2]
ja 0x402894
xor edx, edx
mov ecx, esi
call fcn.00401cc0
mov edi, eax
test edi, edi
jne 0x402c85
mov eax, dword [ebp - 0x310]
movzx ecx, word [esi + 0x10]
add esi, 0x14
mov edx, ecx
test cx, cx
jne 0x402870
test edi, edi
jne 0x402c85
mov eax, dword [0x427ae0]
xor edi, edi
mov esi, 0x427ae0
test eax, eax
je 0x4028e6
nop word [eax + eax]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [esi + 4]
push eax
call fcn.0040d930
add esp, 0xc
test eax, eax
je 0x4028e4
mov eax, dword [esi + 0xc]
add esi, 0xc
test eax, eax
jne 0x4028c0
jmp 0x4028ea
mov edi, esi
test edi, edi
jne 0x402910
lea eax, [ebp - 0x104]
push str.maybe_handle_shebang:_BOM_not_found__using_UTF_8_n
mov dword [ebp - 0x30c], eax
call fcn.00401130
add esp, 4
lea edx, [ebp - 0x104]
mov edi, 0x427ae0
jmp 0x40292e
push dword [edi + 8]
push str.maybe_handle_shebang:_BOM_found__code_page__u_n
call fcn.00401130
lea edx, [ebp - 0x104]
add esp, 8
add edx, dword [edi]
mov dword [ebp - 0x30c], edx
lea ecx, [edx + 0x100]
xor esi, esi
mov eax, edx
cmp edx, ecx
jae 0x402992
nop dword [eax]
mov cl, byte [eax]
mov esi, eax
cmp cl, 0xd
je 0x402976
cmp cl, 0xa
je 0x402976
inc eax
lea ecx, [edx + 0x100]
cmp eax, ecx
jb 0x402940
push str.maybe_handle_shebang:_No_line_terminator_found_n
call fcn.00401130
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036ef
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 8]
cmp ecx, 0x4b0
jne 0x402986
lea esi, [eax + 1]
jmp 0x402991
cmp ecx, 0x2ee0
jne 0x402991
lea esi, [eax + 3]
inc esi
test esi, esi
jne 0x4029b3
push str.maybe_handle_shebang:_No_line_terminator_found_n
call fcn.00401130
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036ef
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 8]
mov ecx, esi
sub ecx, edx
mov dword [ebp - 0x310], ecx
cmp eax, 0x2ee0
ja 0x402ade
je 0x402a7d
sub eax, 0x4b0
je 0x402a55
sub eax, 1
jne 0x4029f0
test cl, 1
je 0x402a00
push ecx
push str.maybe_handle_shebang:_UTF_16BE__but_an_odd_number_of_bytes:__d_n
call fcn.00401130
add esp, 8
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004036ef
mov esp, ebp
pop ebp
ret
test ecx, ecx
jle 0x402b5b
lea edx, [esi - 1]
lea esi, [ebp - 0x308]
sub esi, dword [ebp - 0x30c]
lea edi, [ebp + ecx - 0x30a]
mov dword [ebp - 0x30c], esi
lea esi, [ecx - 1]
mov ecx, dword [ebp - 0x30c]
shr esi, 1
inc esi
movzx eax, byte [edx - 1]
lea edx, [edx - 2]
mov byte [edx + ecx + 2], al
lea edi, [edi - 2]
movzx eax, byte [edx + 2]
mov byte [edi + 2], al
sub esi, 1
jne 0x402a30
mov ecx, dword [ebp - 0x310]
jmp 0x402b5b
push ecx
test cl, 1
je 0x402a62
push str.UTF_16LE__but_an_odd_number_of_bytes:__d_n
jmp 0x4029e8
push edx
lea eax, [ebp - 0x308]
push eax
call fcn.00405510
mov ecx, dword [ebp - 0x310]
add esp, 0xc
jmp 0x402b5b
mov eax, ecx
and eax, 0x80000003
jns 0x402a8d
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x402a9a
push ecx
push str.UTF_32LE__but_not_divisible_by_4:__d_n
jmp 0x4029e8
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
test ecx, ecx
jle 0x402b5b
lea edi, [ecx - 1]
add esi, 0xfffffffc
shr edi, 2
lea edx, [ebp + eax - 0x30a]
inc edi
nop word [eax + eax]
movzx eax, byte [esi + 1]
lea esi, [esi - 4]
mov byte [edx + 1], al
lea edx, [edx - 2]
movzx eax, byte [esi + 4]
mov byte [edx + 2], al
sub edi, 1
jne 0x402ac0
jmp 0x402b5b
cmp eax, 0x2ee1
je 0x402b0b
cmp eax, 0xfde9
jne 0x4029f0
push 0x100
lea esi, [ebp - 0x308]
push esi
push ecx
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
jmp 0x402b5d
mov eax, ecx
and eax, 0x80000003
jns 0x402b1b
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x402b28
push ecx
push str.UTF_32BE__but_not_divisible_by_4:__d_n
jmp 0x4029e8
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
test ecx, ecx
jle 0x402b5b
lea edi, [ecx - 1]
dec esi
shr edi, 2
lea edx, [ebp + eax - 0x30a]
inc edi
movzx eax, byte [esi - 1]
lea esi, [esi - 4]
mov byte [edx + 1], al
lea edx, [edx - 2]
movzx eax, byte [esi + 4]
mov byte [edx + 2], al
sub edi, 1
jne 0x402b42
shr ecx, 1
test ecx, ecx
jle 0x4029f0
dec ecx
lea eax, [ecx + ecx]
cmp eax, 0x202
jae 0x402c80
xor edx, edx
mov word [ebp + eax - 0x308], dx
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x30c]
mov edx, ecx
push eax
lea eax, [ebp - 0x310]
push eax
lea ecx, [ebp - 0x308]
call fcn.004024f0
mov esi, dword [ebp - 0x310]
add esp, 0xc
mov edi, eax
test esi, esi
je 0x4029f0
push esi
push str.parse_shebang:_found_command:__ls_n
call fcn.00401130
add esp, 8
test edi, edi
je 0x402ca3
push 0x20
push esi
call fcn.00404308
mov edi, eax
add esp, 8
test edi, edi
je 0x402be9
xor eax, eax
lea ecx, [edi + 2]
mov word [edi], ax
call fcn.004010f0
mov edi, eax
push 6
push str.python
push esi
call fcn.0040e0d6
add esp, 0xc
test eax, eax
jne 0x402cb6
add esi, 0xc
cmp dword [ebp - 0x31c], eax
je 0x402c52
movzx eax, word [esi]
test ax, ax
je 0x402c21
push eax
call fcn.0040dbd0
add esp, 4
test eax, eax
je 0x402c52
push str.searching_PATH_for_python_executable_n
call fcn.00401130
add esp, 4
mov ecx, str.python.exe
call fcn.00402150
test eax, eax
jne 0x402cc3
push str._not_found_
push str.Python_on_path:__ls_n
call fcn.00401130
add esp, 8
cmp word [esi], 0
je 0x402c67
mov ecx, esi
call fcn.004026f0
test eax, eax
je 0x402cf1
mov edx, 1
mov ecx, esi
call fcn.00401cc0
test eax, eax
jne 0x402d0b
jmp 0x402cfe
call fcn.0040381f
push edi
push str.script_file_is_compiled_against_Python__ls_n
call fcn.00401130
add esp, 8
lea ecx, [edi + 0x14]
xor edx, edx
push dword [ebp - 0x314]
call fcn.00402030
push dword [ebp - 0x314]
mov edx, dword [ebp - 0x30c]
mov ecx, esi
call fcn.00402030
push esi
push str.Unknown_virtual_path__ls
push 0x66
call fcn.00401180
lea esi, [eax + 0x208]
push esi
push str.Python_on_path:__ls_n
call fcn.00401130
push esi
push str.located_python_on_PATH:__ls_n
call fcn.00401130
add esp, 0x10
mov edx, edi
mov ecx, esi
push dword [ebp - 0x314]
call fcn.00402030
push esi
push 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.
push 0x66
call fcn.00401180
push esi
push str.Requested_Python_version___ls__is_not_installed
push 0x67
call fcn.00401180
push dword [ebp - 0x314]
lea ecx, [eax + 0x14]
mov edx, edi
call fcn.00402030
int3