Function at 0x40a7cb
Capabilities:
Read file on windows

Disassembly:
push 0x494
mov eax, 0x436b25
call fcn.0041d86a
mov esi, ecx
mov edi, edx
xor ebx, ebx
mov eax, esi
mov dword [ebp - 0x490], edi
mov dword [ebp - 0x478], ebx
mov byte [ebp - 0x46d], 1
call fcn.004070dc
test al, al
je 0x40ab48
mov eax, esi
call fcn.00406fe4
test al, al
je 0x40ab48
mov dword [ebp - 0x4a0], ebx
mov dword [ebp - 0x49c], ebx
mov dword [ebp - 0x498], ebx
push ebx
lea eax, [ebp - 0x4a0]
push eax
push esi
mov dword [ebp - 4], ebx
call fcn.00407796
mov eax, dword [ebp - 0x49c]
sub eax, dword [ebp - 0x4a0]
add esp, 0xc
push 0x1c
cdq
pop ecx
idiv ecx
mov dword [ebp - 0x474], ebx
mov dword [ebp - 0x48c], eax
cmp byte [ebp - 0x46d], 1
jne 0x40ab3b
mov eax, dword [ebp - 0x474]
cmp eax, dword [ebp - 0x48c]
jae 0x40ab3b
imul eax, eax, 0x1c
mov byte [ebp - 4], 1
add eax, dword [ebp - 0x4a0]
lea ecx, [ebp - 0x450]
push eax
call fcn.00407ad5
lea ecx, [ebp - 0x450]
mov byte [ebp - 4], 2
call fcn.00407670
cmp al, bl
jne 0x40a8da
lea eax, [ebp - 0x434]
push eax
mov ecx, edi
call fcn.00406685
or dword [ebp - 0x478], 1
cmp dword [eax + 0x14], 8
pop ecx
mov ecx, dword [eax + 0x10]
jb 0x40a8c1
mov eax, dword [eax]
push ecx
push eax
lea eax, [ebp - 0x450]
call fcn.0040a72f
mov byte [ebp - 0x46e], 1
cmp eax, 0xffffffff
jne 0x40a8e0
mov byte [ebp - 0x46e], bl
test byte [ebp - 0x478], 1
je 0x40a8fe
and dword [ebp - 0x478], 0xfffffffe
push ebx
push 1
lea ecx, [ebp - 0x434]
call fcn.004069c7
cmp byte [ebp - 0x46e], bl
je 0x40aafe
lea eax, [ebp - 0x450]
push eax
call fcn.004074ee
pop ecx
cmp al, bl
jne 0x40a92b
lea eax, [ebp - 0x450]
call fcn.004071c6
jmp 0x40aafe
xor eax, eax
push 0xffffffffffffffff
mov word [ebp - 0x434], ax
push ebx
lea eax, [ebp - 0x450]
push eax
lea ecx, [ebp - 0x434]
mov dword [ebp - 0x420], 7
mov dword [ebp - 0x424], ebx
call fcn.00406884
lea eax, [ebp - 0x46c]
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.00406685
pop ecx
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 8
mov esi, dword [edi + 0x10]
mov ecx, dword [eax + 0x10]
jb 0x40a97e
mov eax, dword [eax]
push ecx
push eax
lea eax, [ebp - 0x434]
call fcn.0040a72f
push str..log
mov edi, eax
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
push eax
push esi
lea esi, [ebp - 0x434]
call fcn.0040ab8f
push 0xffffffffffffffff
push ebx
push eax
mov ecx, esi
call fcn.00406884
push ebx
push 1
lea ecx, [ebp - 0x46c]
mov byte [ebp - 4], 3
call fcn.004069c7
cmp dword [ebp - 0x43c], 8
mov eax, dword [ebp - 0x450]
jae 0x40a9d8
lea eax, [ebp - 0x450]
push ebx
mov edi, 0x80
push edi
push 4
push ebx
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x484], esi
cmp esi, 0xffffffff
je 0x40aaf0
or dword [ebp - 0x47c], 0xffffffff
cmp dword [ebp - 0x420], 8
mov eax, dword [ebp - 0x434]
jae 0x40aa1c
lea eax, [ebp - 0x434]
push edi
push 0x40
push 0x8101
push eax
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.MSVCR100.dll__wsopen_s]
add esp, 0x14
cmp eax, ebx
je 0x40aa52
push dword [ebp - 0x47c]
call dword [sym.imp.MSVCR100.dll__close]
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40aaf0
push 0x43dcac
push dword [ebp - 0x47c]
call fcn.00419800
pop ecx
pop ecx
mov dword [ebp - 0x488], eax
cmp eax, ebx
je 0x40aa39
push ebx
lea eax, [ebp - 0x480]
push eax
mov edi, 0x400
push edi
lea eax, [ebp - 0x418]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x480], ebx
call esi
cmp dword [ebp - 0x480], ebx
jbe 0x40aacd
push dword [ebp - 0x480]
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x488]
call fcn.00419350
add esp, 0xc
push ebx
lea eax, [ebp - 0x480]
push eax
push edi
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x484]
jmp 0x40aa90
push dword [ebp - 0x488]
call fcn.00419500
pop ecx
push dword [ebp - 0x484]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x450]
call fcn.004071c6
push ebx
push 1
lea ecx, [ebp - 0x434]
call fcn.004069c7
inc dword [ebp - 0x474]
push ebx
push 1
lea ecx, [ebp - 0x450]
call fcn.004069c7
mov dword [ebp - 4], ebx
jmp 0x40ab30
mov edi, dword [ebp - 0x490]
jmp 0x40a855
lea esi, [ebp - 0x4a0]
call fcn.0040ab5a
jmp 0x40ab4e
mov byte [ebp - 0x46d], bl
mov al, byte [ebp - 0x46d]
call fcn.0041d8c6
ret