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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x45b940
push 0x439ec0
mov eax, dword fs:[0]
push eax
sub esp, 0x52c
mov eax, dword [0x45f478]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x52c], ebx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x530], eax
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x538], esi
mov dword [ebp - 4], 0
lea eax, [ebp - 0x520]
push eax
call fcn.0040d3c0
add esp, 4
mov dword [esi], 0
test edi, edi
jne 0x405b68
test ebx, ebx
jne 0x405b68
push 0xe0000003
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push ebx
push ebx
push 0x60000001
mov ebx, dword [sym.imp.KERNEL32.dll_RaiseException]
call ebx
jmp 0x405b6e
mov ebx, dword [sym.imp.KERNEL32.dll_RaiseException]
mov esi, edi
mov dword [ebp - 0x53c], esi
test edi, edi
jne 0x405bbf
push edi
push 0x80
push 3
push edi
push 3
push connect
push dword [ebp - 0x52c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x53c], esi
cmp esi, 0xffffffff
jne 0x405bbf
push str.CreateFile
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push edi
push edi
push 0x60000001
call ebx
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405bfb
test edi, edi
jne 0x405bdc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x44a5e8
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 0
push 0
push 0x60000001
call ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [ebp - 0x528], ecx
cmp ecx, 0xffffffff
jne 0x405c41
test edi, edi
jne 0x405c1c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x44a5f8
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 0
push 0
push 0x60000001
call ebx
mov ecx, dword [ebp - 0x528]
test ecx, ecx
je 0x405d0b
cmp byte [ebp + 0x18], 0
je 0x405c50
inc ecx
push ecx
call fcn.004380a8
add esp, 4
mov ecx, dword [ebp - 0x530]
mov dword [ecx], eax
mov dword [ebp - 0x52c], 0
push 0
lea ecx, [ebp - 0x52c]
push ecx
push dword [ebp - 0x528]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405cb0
test edi, edi
jne 0x405c91
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x44a604
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 0
push 0
push 0x60000001
call ebx
mov ecx, dword [ebp - 0x528]
cmp dword [ebp - 0x52c], ecx
je 0x405cf9
test edi, edi
jne 0x405cc9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xe0000008
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x44a604
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 0
push 0
push 0x60000001
call ebx
mov ecx, dword [ebp - 0x528]
cmp byte [ebp + 0x18], 0
je 0x405d0b
mov eax, dword [ebp - 0x530]
mov eax, dword [eax]
mov byte [ecx + eax], 0
mov eax, dword [ebp - 0x538]
mov dword [eax], ecx
test edi, edi
jne 0x405d3e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x405d3e
push 0x44a4b8
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push edi
push edi
push 0x60000001
call ebx
mov al, 1
jmp 0x405dc9
mov byte [ebp - 0x521], al
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00439a01
mov esp, ebp
pop ebp
ret