Function at 0x401490
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x34], 0
call sub.msvcrt.dll___p___argc
cmp dword [eax], 9
jle 0x401511
lea eax, [ebp - 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x30]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll___wgetmainargs
call sub.msvcrt.dll___p___argc
mov edx, dword [ebp - 0x28]
cmp dword [eax], edx
je 0x40153d
mov dword [esp + 0x10], str.argc____argc
mov dword [esp + 0xc], str.WinMain
mov dword [esp + 8], 0xb9
mov dword [esp + 4], str.gspawn_win32_helper.c
mov dword [esp], 0
call sub.libglib_2.0_0.dll_g_assertion_message_expr
mov dword [esp + 0x10], str.__argc___ARG_COUNT
mov dword [esp + 0xc], str.WinMain
mov dword [esp + 8], 0xb0
mov dword [esp + 4], str.gspawn_win32_helper.c
mov dword [esp], 0
call sub.libglib_2.0_0.dll_g_assertion_message_expr
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov ebx, eax
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov esi, dword [eax + 4]
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov edi, dword [eax + 4]
xor eax, eax
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
cmp byte [esi + ecx - 2], 0x23
sete cl
movzx ecx, cl
lea edi, [ecx*4 + 0x28]
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov esi, eax
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
cmp byte [eax], 0x2d
je 0x4015d4
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
cmp byte [eax], 0x7a
je 0x4019c2
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov edx, eax
test eax, eax
jne 0x4019e0
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
cmp byte [eax], 0x2d
je 0x40162d
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
cmp byte [eax], 0x7a
je 0x401a27
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov edx, eax
cmp eax, 1
je 0x40162d
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [ebp - 0x60], edx
call sub.msvcrt.dll__dup2
mov edx, dword [ebp - 0x60]
mov dword [esp], edx
call sub.msvcrt.dll__close
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
cmp byte [eax], 0x2d
je 0x401686
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
cmp byte [eax], 0x7a
je 0x401a03
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov edx, eax
cmp eax, 2
je 0x401686
mov dword [esp + 4], 2
mov dword [esp], edx
mov dword [ebp - 0x60], edx
call sub.msvcrt.dll__dup2
mov edx, dword [ebp - 0x60]
mov dword [esp], edx
call sub.msvcrt.dll__close
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
cmp byte [eax], 0x2d
je 0x4019a9
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll__wchdir
test eax, eax
js 0x401a4b
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x1c]
cmp byte [eax], 0x79
je 0x401976
mov edx, 1
mov eax, ebx
call fcn.004013c0
mov dword [ebp - 0x4c], eax
xor edx, edx
mov eax, esi
call fcn.004013c0
mov dword [ebp - 0x58], eax
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x24]
cmp byte [eax], 0x77
setne al
movzx eax, al
mov dword [ebp - 0x5c], eax
add edi, dword [ebp - 0x2c]
mov dword [ebp - 0x40], edi
mov esi, dword [edi]
test esi, esi
je 0x401a5c
mov dword [ebp - 0x44], 0
mov edx, edi
xor eax, eax
nop
inc eax
lea ecx, [eax*4]
mov ebx, dword [edx + eax*4]
test ebx, ebx
jne 0x401710
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x54], ecx
mov dword [esp + 4], 4
inc eax
mov dword [esp], eax
call sub.libglib_2.0_0.dll_g_malloc_n
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x3c], 0
nop
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx + edx*4]
mov dx, word [eax]
test dx, dx
je 0x40190e
xor ebx, ebx
xor ecx, ecx
jmp 0x401786
cmp dx, 9
je 0x40178c
cmp dx, 0x22
je 0x401818
cmp dx, 0x5c
je 0x4017fc
inc ecx
add eax, 2
mov dx, word [eax]
test dx, dx
je 0x40179d
cmp dx, 0x20
jne 0x401760
mov ebx, 1
inc ecx
add eax, 2
mov dx, word [eax]
test dx, dx
jne 0x401786
mov dword [esp + 4], 2
lea eax, [ecx + ebx*2 + 1]
mov dword [esp], eax
call sub.libglib_2.0_0.dll_g_malloc_n
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x48]
mov dword [ecx + edx*4], eax
mov ecx, dword [ebp - 0x40]
mov esi, dword [ecx + edx*4]
test ebx, ebx
je 0x4017df
mov word [eax], 0x22
add eax, 2
jmp 0x4017df
cmp di, 0x5c
je 0x401820
mov word [eax], di
add eax, 2
add esi, 2
mov di, word [esi]
test di, di
je 0x401844
cmp di, 0x22
jne 0x4017d0
mov word [eax], 0x5c
add eax, 2
mov di, word [esi]
jmp 0x4017d6
mov edx, eax
nop
add edx, 2
mov si, word [edx]
cmp si, 0x5c
je 0x401800
cmp si, 0x22
jne 0x40177a
nop
inc ecx
jmp 0x40177a
mov edx, esi
nop
add edx, 2
mov cx, word [edx]
cmp cx, 0x5c
je 0x401824
cmp cx, 0x22
jne 0x4017d6
mov word [eax], 0x5c
add eax, 2
mov di, word [esi]
jmp 0x4017d6
test ebx, ebx
je 0x401850
mov word [eax], 0x22
add eax, 2
mov word [eax], 0
inc dword [ebp - 0x3c]
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x44], eax
jg 0x401744
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
mov dword [ecx + edx], 0
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x20]
cmp byte [eax], 0x79
je 0x401952
mov ecx, dword [ebp - 0x50]
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call sub.msvcrt.dll__wspawnv
mov dword [ebp - 0x20], eax
call sub.msvcrt.dll__errno
mov eax, dword [eax]
cmp dword [ebp - 0x20], 0xffffffff
je 0x401938
mov dword [esp + 8], 4
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x4c]
mov dword [esp], edx
call sub.msvcrt.dll__write
mov dword [esp + 8], 4
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x4c]
mov dword [esp], ecx
call sub.msvcrt.dll__write
mov dword [esp + 8], 1
lea eax, [ebp - 0x19]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sub.msvcrt.dll__read
xor eax, eax
add esp, 0x7c
pop ebx
pop esi
pop edi
leave
ret 0x10
mov dword [esp + 4], 2
mov dword [esp], 1
call sub.libglib_2.0_0.dll_g_malloc_n
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x48]
mov dword [ecx + edx*4], eax
mov ecx, dword [ebp - 0x40]
mov esi, dword [ecx + edx*4]
xor ebx, ebx
jmp 0x4017df
test eax, eax
je 0x4018b4
mov edx, 2
mov eax, dword [ebp - 0x4c]
call fcn.00401440
jmp 0x4018b4
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x28]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x5c]
mov dword [esp], edx
call sub.msvcrt.dll__wspawnvp
mov dword [ebp - 0x20], eax
jmp 0x4018a3
mov edx, 3
mov dword [ebp - 0x3c], edi
mov edi, esi
mov esi, ebx
mov ebx, edx
cmp ebx, esi
je 0x401994
cmp ebx, edi
je 0x401994
mov dword [esp], ebx
call sub.msvcrt.dll__close
inc ebx
cmp ebx, 0x3e8
jne 0x401984
mov ebx, esi
mov esi, edi
mov edi, dword [ebp - 0x3c]
jmp 0x4016c2
call sub.msvcrt.dll___p___argv
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
cmp byte [eax + 1], 0
je 0x4016af
jmp 0x401699
mov dword [esp + 4], 0
mov dword [esp], str.NUL:
call sub.msvcrt.dll__open
mov edx, eax
test eax, eax
je 0x4015d4
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x60], edx
call sub.msvcrt.dll__dup2
mov edx, dword [ebp - 0x60]
mov dword [esp], edx
call sub.msvcrt.dll__close
jmp 0x4015d4
mov dword [esp + 4], 1
mov dword [esp], str.NUL:
call sub.msvcrt.dll__open
mov edx, eax
cmp eax, 2
jne 0x401668
jmp 0x401686
mov dword [esp + 4], 1
mov dword [esp], str.NUL:
call sub.msvcrt.dll__open
mov edx, eax
cmp eax, 1
jne 0x40160f
jmp 0x40162d
mov edx, 1
mov eax, ebx
call fcn.00401440
jmp 0x4016af
mov dword [esp + 4], 4
mov dword [esp], 1
call sub.libglib_2.0_0.dll_g_malloc_n
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], 0
jmp 0x401864