Function at 0x4067cd
Capabilities:
Get file size
Read file on windows
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
mov esi, 0x80
cmp dword [ebp + 0x10], ebx
je 0x4067f5
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 3
push ebx
push 3
mov edi, 0x80000000
push edi
push dword [ebp + 8]
call esi
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x406826
push ebx
push 4
push 3
push ebx
push 3
push edi
push dword [ebp + 8]
call esi
mov dword [ebp - 8], eax
cmp dword [ebp + 0x10], ebx
je 0x406836
push 2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp dword [ebp - 8], 0xffffffff
je 0x4069e8
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x4069dc
cmp eax, ebx
je 0x4069dc
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp + 0x10]
push eax
push 0x40
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 8]
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
je 0x4069dc
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push dword [ebp - 0x44]
push dword [ebp - 8]
call edi
cmp eax, 0xffffffff
je 0x4069dc
push ebx
lea eax, [ebp - 0x18]
push eax
push 0xf8
lea eax, [ebp - 0x178]
push eax
push dword [ebp - 8]
call esi
test eax, eax
je 0x4069dc
movzx eax, word [ebp - 0x164]
mov ecx, dword [ebp - 0x44]
push ebx
push ebx
lea eax, [eax + ecx + 0x18]
push eax
push dword [ebp - 8]
call edi
cmp eax, 0xffffffff
je 0x4069dc
xor eax, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
cmp ax, word [ebp - 0x172]
jae 0x406946
push 0x28
pop eax
push ebx
lea ecx, [ebp + 0x10]
push ecx
push eax
mov dword [ebp + 0x10], eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 8]
call esi
test eax, eax
je 0x406943
movzx edx, word [ebp - 0x172]
lea eax, [edx - 1]
cmp dword [ebp - 0x14], eax
jne 0x406928
mov ecx, dword [ebp - 0x13c]
mov eax, dword [ebp - 0x38]
lea eax, [ecx + eax - 1]
dec ecx
not ecx
and eax, ecx
add eax, dword [ebp - 0x2c]
jmp 0x40692e
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x30]
mov dword [ebp + 0x10], eax
cmp dword [ebp - 0x10], eax
jae 0x406939
mov dword [ebp - 0x10], eax
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], edx
jl 0x4068e9
jmp 0x406946
mov dword [ebp - 4], ebx
movzx eax, word [ebp - 0x172]
cmp dword [ebp - 0x14], eax
jl 0x4069df
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 4], eax
jbe 0x406961
mov dword [ebp - 4], eax
push dword [ebp - 4]
call fcn.0040ec27
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x4069dc
push ebx
push ebx
push ebx
push dword [ebp - 8]
call edi
cmp eax, 0xffffffff
je 0x4069cb
mov edi, dword [ebp - 0xc]
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 4]
push edi
push dword [ebp - 8]
call esi
test eax, eax
je 0x4069cb
movzx eax, word [ebp - 0x164]
add eax, dword [ebp - 0x44]
lea ecx, [eax + edi + 0x18]
movzx eax, word [ebp - 0x172]
dec eax
imul eax, eax, 0x28
add eax, ecx
mov ecx, dword [ebp - 0x13c]
mov edx, dword [eax + 8]
lea edx, [edx + ecx - 1]
dec ecx
not ecx
and edx, ecx
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x4069df
push dword [ebp - 0xc]
mov dword [ebp - 4], ebx
call fcn.0040ec89
pop ecx
mov dword [ebp - 0xc], ebx
jmp 0x4069df
mov dword [ebp - 4], ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
pop ebx
leave
ret