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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43a0a8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x44bb64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], edi
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40cf50
call fcn.004021e0
jmp 0x40cf57
mov ebx, eax
mov dword [ebp - 0x24], ebx
xor eax, eax
push eax
call fcn.0041d2c0
mov edx, dword [0x44bb48]
mov eax, dword [edx + 0xc]
add esp, 4
mov ecx, 0x44bb48
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
lea ecx, [ebp - 0x18]
push ecx
push ebx
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x40cf9e
call fcn.004021e0
cmp eax, edi
jge 0x40cf9b
mov edi, dword [ebp - 0x1c]
jmp 0x40cfa8
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov edi, eax
mov dword [ebp - 0x18], edx
xor eax, eax
push eax
call fcn.0041d2c0
mov eax, dword [ebp + 0xc]
add esp, 4
cmp edi, eax
jb 0x40cfba
mov edi, eax
lea edx, [edi + 1]
test edx, edx
jns 0x40cfcb
push 0x80070057
call fcn.00401210
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x40cfe8
push edx
lea ecx, [ebp - 0x10]
call fcn.00409600
mov esi, dword [ebp - 0x10]
push 0
lea eax, [ebp + 8]
push eax
push edi
push esi
push ebx
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d009
call fcn.004021e0
jmp 0x40d017
mov eax, dword [ebp + 8]
sub eax, edi
neg eax
sbb eax, eax
and eax, 0x80070026
push eax
call fcn.0041d2c0
add esp, 4
mov byte [edi + esi], 0
test ebx, ebx
je 0x40d034
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov edx, dword [0x44bb48]
mov eax, dword [edx + 0xc]
mov ecx, 0x44bb48
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x40d078
test esi, 0xffff0000
jne 0x40d078
movzx edi, si
push 0
push edi
call fcn.004019d0
add esp, 8
test eax, eax
je 0x40d081
push edi
push eax
lea ecx, [ebp + 8]
call fcn.00405230
jmp 0x40d081
push esi
lea ecx, [ebp + 8]
call fcn.0040b160
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov edi, dword [ebp + 8]
mov edx, dword [eax]
push edi
push edx
mov byte [ebp - 4], 1
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d0b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d0d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x40d0de
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8