Function at 0x403178
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov esi, eax
mov edi, edx
sub esp, 0xc
mov ebx, 1
mov eax, 0xffffffff
mov edx, 0x7fffffff
nop
push 0
push 0xa
push edx
push eax
call fcn.0040ce40
inc ebx
add esp, 0x10
test edx, edx
jl 0x4031ae
jg 0x403194
cmp eax, 9
ja 0x403194
mov ecx, dword [0x40e2a4]
test ecx, ecx
je 0x4033a9
test edi, edi
js 0x4033b1
mov edx, dword [0x4110cc]
test edx, edx
mov dword [0x40e2a4], 0
jne 0x40359d
mov eax, dword [0x4110c8]
test eax, eax
je 0x40357c
mov eax, dword [0x420fe0]
mov ecx, dword [0x420fe4]
cmp edi, 8
mov ebp, 0xffffffff
mov dword [0x418f50], 0xffffffff
mov dword [0x418f54], 0xffffffff
mov dword [0x421010], eax
mov dword [0x421014], ecx
je 0x403545
mov eax, dword [0x4110cc]
test eax, eax
jne 0x4034ed
push ebx
push dword [0x421014]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push dword [0x421010]
add ecx, 0x20
push ecx
call fcn.0040ad30
mov dword [esp], 0x20
call sub.msvcrt.dll_putchar
push ebx
push dword [0x418f54]
mov esi, dword [sym.imp.msvcrt.dll__iob]
push dword [0x418f50]
add esi, 0x20
push esi
call fcn.0040ad30
add esp, 0x14
push 0x20
call sub.msvcrt.dll_putchar
mov edx, dword [0x421010]
mov ecx, dword [0x421014]
mov ebx, edx
and ebx, ecx
add esp, 0x10
inc ebx
jne 0x4034c4
mov dword [0x4421a0], 0xffffffff
mov dword [0x4421a4], 0xffffffff
mov dword [0x462360], 0
mov dword [0x462364], 0
mov dword [0x418f50], 0
mov dword [0x418f54], 0
mov dword [0x421010], 0
mov dword [0x421014], 0
mov ecx, dword [0x418f50]
mov ebx, dword [0x418f54]
mov edx, ecx
and edx, ebx
inc edx
jne 0x40349d
mov dword [0x421020], 0xffffffff
mov dword [0x421024], 0xffffffff
mov dword [0x462360], 0
mov dword [0x462364], 0
mov dword [0x418f50], 0
mov dword [0x418f54], 0
mov dword [0x421010], 0
mov dword [0x421014], 0
xor ecx, ecx
xor ebx, ebx
mov ebp, dword [sym.imp.msvcrt.dll__iob]
sub esp, 0xc
add ebp, 0x20
mov eax, dword [0x421010]
push ebp
sub eax, dword [0x462360]
mov edi, dword [0x421014]
push dword [0x418f54]
sbb edi, dword [0x462364]
sub ecx, eax
push dword [0x418f50]
sbb ebx, edi
push ebx
push ecx
call fcn.0040acc4
add esp, 0x18
push 0x4421d0
push str.__s_n
call sub.msvcrt.dll_printf
add esp, 0x10
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
jns 0x4031e9
mov esi, dword [0x4421a4]
test esi, esi
mov eax, dword [0x4421a0]
jl 0x4033a1
jle 0x40364e
mov edi, dword [0x421024]
test edi, edi
mov eax, dword [0x421020]
jl 0x4033a1
jle 0x40367f
mov ebp, dword [0x4110cc]
test ebp, ebp
jne 0x40365c
mov edx, dword [0x4110c8]
test edx, edx
jne 0x403443
push ebx
push dword [0x4421a4]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push dword [0x4421a0]
add eax, 0x20
push eax
call fcn.0040ad30
mov dword [esp], 0x20
call sub.msvcrt.dll_putchar
push ebx
push dword [0x421024]
mov ebx, dword [sym.imp.msvcrt.dll__iob]
push dword [0x421020]
add ebx, 0x20
push ebx
call fcn.0040ad30
add esp, 0x14
push 0x20
call sub.msvcrt.dll_putchar
add esp, 0x10
mov edx, dword [sym.imp.msvcrt.dll__iob]
sub esp, 0xc
add edx, 0x20
mov ecx, dword [0x4421a0]
push edx
sub ecx, dword [0x462360]
mov ebp, dword [0x4421a4]
mov esi, dword [0x421020]
push dword [0x421024]
sbb ebp, dword [0x462364]
mov edi, dword [0x421024]
sub esi, ecx
push dword [0x421020]
sbb edi, ebp
push edi
push esi
call fcn.0040acc4
add esp, 0x14
push str.__totals_
call sub.msvcrt.dll_puts
jmp 0x40339e
mov edx, dword [0x421024]
test edx, edx
mov eax, dword [0x421020]
js 0x403351
add eax, ecx
adc edx, ebx
mov dword [0x421020], eax
mov dword [0x421024], edx
jmp 0x403351
mov esi, dword [0x4421a4]
test esi, esi
mov ebx, dword [0x4421a0]
js 0x4032e6
add ebx, edx
adc esi, ecx
mov dword [0x4421a0], ebx
mov dword [0x4421a4], esi
jmp 0x4032e6
sub esp, 0xc
push 0x432160
call sub.msvcrt.dll_localtime
add esp, 0xc
push ebp
push dword [edi*4 + 0x40e2c0]
mov esi, eax
push str._5s__08lx
call sub.msvcrt.dll_printf
add esp, 0x10
test esi, esi
je 0x4035b2
sub esp, 0xc
push dword [esi + 4]
push dword [esi + 8]
push dword [esi + 0xc]
mov ebp, dword [esi + 0x10]
lea edi, [ebp*4 + 0x40f404]
push edi
push str._s_3d__02d:_02d
call sub.msvcrt.dll_printf
add esp, 0x20
jmp 0x40322e
mov edx, dword [0x4622e0]
test edx, edx
jne 0x403221
push 2
push 0xffffffffffffffff
push 0xfffffffffffffff8
push esi
call sub.msvcrt.dll__lseeki64
mov ecx, edx
mov edx, eax
and eax, ecx
add esp, 0x10
inc eax
jne 0x4035c7
mov dword [0x421010], edx
mov dword [0x421014], ecx
jmp 0x403221
push eax
push str.uncompressed
push ebx
push ebx
push str.compressed
push ebx
push ebx
push str._.s__.s__ratio_uncompressed_name_n
call sub.msvcrt.dll_printf
add esp, 0x20
jmp 0x4031e9
sub esp, 0xc
push str.method__crc_____date__time
call sub.msvcrt.dll_printf
add esp, 0x10
jmp 0x4031dc
sub esp, 0xc
push str._________:__
call sub.msvcrt.dll_printf
add esp, 0x10
jmp 0x40322e
push ebp
push 8
lea ebp, [esp + 8]
add edx, 8
push ebp
adc ecx, 0
push esi
mov dword [0x421010], edx
mov dword [0x421014], ecx
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 8
je 0x4035f4
call fcn.0040a900
movzx edx, byte [esp + 1]
movzx ecx, byte [esp + 3]
shl edx, 8
shl ecx, 8
movzx ebp, byte [esp]
movzx esi, byte [esp + 2]
or ebp, edx
or esi, ecx
movzx edx, byte [esp + 7]
shl esi, 0x10
movzx eax, byte [esp + 5]
movzx ecx, byte [esp + 6]
shl edx, 8
or ebp, esi
shl eax, 8
movzx esi, byte [esp + 4]
or ecx, edx
or esi, eax
shl ecx, 0x10
or esi, ecx
mov dword [0x418f50], esi
mov dword [0x418f54], 0
jmp 0x403221
cmp eax, 0
jbe 0x4033a1
jmp 0x4033c6
sub esp, 0xc
push str.
call sub.msvcrt.dll_printf
mov ecx, dword [0x4110cc]
add esp, 0x10
test ecx, ecx
jne 0x4033f3
jmp 0x4033e9
cmp eax, 0
jbe 0x4033a1
jmp 0x4033db