Function at 0x4045aa
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
call fcn.004044a0
cmp dword [0x4281a0], 0xffffffff
je 0x4045cf
mov eax, dword [0x4281a0]
push eax
call fcn.004048e9
add esp, 4
mov dword [0x4286bc], 0
cmp dword [0x41d0b8], 0
jne 0x40486a
cmp dword [ebp + 8], 0
jne 0x404609
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x100]
mov dword [ebp + 8], edx
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x4281a0], eax
mov ecx, dword [0x4286bc]
add ecx, 1
mov dword [0x4286bc], ecx
cmp dword [0x4281a0], 0xffffffff
je 0x404852
mov dword [ebp - 0x110], 0
cmp dword [0x41d0c4], 0
je 0x404667
mov edx, dword [0x41d0c4]
mov dword [ebp - 0x124], edx
jmp 0x40467b
push 0
mov eax, dword [0x4281a0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x124], eax
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x10c], ecx
mov dword [0x41d0c4], 0
mov eax, dword [ebp - 0x10c]
xor edx, edx
mov ecx, 0x28
div ecx
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0x20
jle 0x4046b9
mov dword [ebp - 0x11c], 0x20
mov edx, dword [ebp - 0x11c]
imul edx, edx, 0x28
mov dword [ebp - 0x108], edx
push 0
push 0
mov eax, dword [ebp - 0x10c]
sub eax, dword [ebp - 0x108]
push eax
mov ecx, dword [0x4281a0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x4286a8], 0
push 0
lea edx, [ebp - 0x114]
push edx
mov eax, dword [ebp - 0x108]
push eax
mov ecx, 0x4286ac
mov edx, dword [ebp - 0x11c]
imul edx, edx, 0x28
sub ecx, edx
push ecx
mov eax, dword [0x4281a0]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [0x4286bc]
add ecx, 1
mov dword [0x4286bc], ecx
mov edx, dword [ebp - 0x114]
cmp edx, dword [ebp - 0x108]
jne 0x404833
mov eax, dword [0x4286bc]
add eax, 1
mov dword [0x4286bc], eax
mov dword [ebp - 0x118], 0
jmp 0x404766
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp - 0x118]
cmp edx, dword [ebp - 0x11c]
jge 0x404833
mov eax, 0x1f
sub eax, dword [ebp - 0x118]
imul eax, eax, 0x28
add eax, 0x4281ac
mov dword [ebp - 0x104], eax
mov ecx, dword [ebp - 0x118]
add ecx, 1
imul ecx, ecx, 0x28
mov dword [ebp - 0x108], ecx
push 0x411454
call fcn.00401550
add esp, 4
push 0
mov edx, dword [ebp - 0x108]
push edx
mov eax, dword [ebp - 0x104]
push eax
call fcn.00401757
add esp, 0xc
cmp dword [0x4286a8], 0x474c5545
jne 0x404809
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x120], ecx
movsx edx, byte [0x428684]
cmp dword [ebp - 0x120], edx
jne 0x404809
mov dword [ebp - 0x110], 1
mov eax, dword [ebp - 0x120]
mov dword [0x4281a4], eax
jmp 0x404833
push 0x41145c
call fcn.00401550
add esp, 4
push 1
mov ecx, dword [ebp - 0x108]
push ecx
mov edx, dword [ebp - 0x104]
push edx
call fcn.00401757
add esp, 0xc
jmp 0x404757
cmp dword [ebp - 0x110], 0
jne 0x404852
mov eax, dword [0x4281a0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4281a0], 0xffffffff
xor ecx, ecx
cmp dword [0x4281a0], 0xffffffff
sete cl
and ecx, dword [0x41d0bc]
mov dword [0x41d0b8], ecx
mov eax, dword [0x4281a0]
mov esp, ebp
pop ebp
ret