Function at 0x402084
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push esi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], edi
call fcn.00451684
pop ecx
test eax, eax
jne 0x402285
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4020b3
mov dword [eax], edi
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x4020bc
mov dword [ebx], edi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4020c5
mov dword [eax], edi
push 0x48a244
push esi
call fcn.00452920
pop ecx
neg eax
pop ecx
sbb edi, edi
push 0x489608
and edi, 0xffffb1e0
push esi
add edi, 0x4e20
call fcn.00450cdc
pop ecx
push eax
call fcn.00470487
pop ecx
pop ecx
test eax, eax
jne 0x402106
push esi
call fcn.00403ddb
pop ecx
mov dword [ebp - 0xc], eax
jmp 0x40210a
and dword [ebp - 0xc], 0
push 0
push edi
push 0
push SQLGetDiagRec
push 3
push 0
push 7
push closesocket
push esi
call fcn.0040fec4
mov edi, eax
add esp, 0x24
cmp edi, 0xffffffff
jne 0x40216f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x402285
cmp eax, 3
je 0x402285
cmp eax, 0xf
je 0x402285
cmp eax, 0x35
je 0x402285
push eax
push str._GetLastError_
push esi
push str.:6:CalculateArchiveCheckSum___s___FAILED:_CreateFileTimeOut___FAILED:__s_ld
call fcn.0040d9e1
jmp 0x402282
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x402197
push str._GetLastError_
push esi
push str.:7:CalculateArchiveCheckSum___s___EAP:_GetFileSize___FAILED:__s
call fcn.0040d9e1
add esp, 0xc
and dword [ebp - 0x14], 0
push 0
push 0
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402254
cmp dword [ebp - 4], 4
jb 0x402254
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40222f
cmp dword [ebp - 4], 4
jb 0x40222f
push 1
push dword [ebp - 8]
push edi
call fcn.0040228c
add esp, 0xc
mov esi, eax
push 0x59c
push str.C:UsersOfficeDocumentsVisual_StudioPAULAArchive.c
push str.CalculateArchiveCheckSum
push edi
call fcn.0040eb13
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402215
mov dword [eax], esi
test ebx, ebx
je 0x40221e
mov eax, dword [ebp - 0x10]
mov dword [ebx], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40222a
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
xor eax, eax
inc eax
jmp 0x402287
push 0x58d
push str.C:UsersOfficeDocumentsVisual_StudioPAULAArchive.c
push str.CalculateArchiveCheckSum
push edi
call fcn.0040eb13
push str._GetLastError_
push dword [ebp - 4]
push esi
push str.:7:CalculateArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_Archive_CheckSum:_Only_read__ld_bytes:__s
jmp 0x40227d
push 0x584
push str.C:UsersOfficeDocumentsVisual_StudioPAULAArchive.c
push str.CalculateArchiveCheckSum
push edi
call fcn.0040eb13
cmp dword [ebp - 0x14], 0
jbe 0x402285
push str._GetLastError_
push dword [ebp - 4]
push esi
push str.:7:CalculateArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_archive_size:_Only_read__ld_bytes:__s
call fcn.0040d511
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret