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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
push eax
call fcn.00401389
add esp, 4
test eax, eax
je 0x408605
xor eax, eax
jmp 0x408866
cmp dword [ebp + 0xc], 0
je 0x408614
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0
cmp dword [ebp + 0x10], 0
je 0x408623
mov edx, dword [ebp + 0x10]
mov dword [edx], 0
cmp dword [ebp + 0x14], 0
je 0x408632
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
push 0x644368
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402086
add esp, 8
test eax, eax
jne 0x408650
mov dword [ebp - 0x18], 0x4e20
jmp 0x408657
mov dword [ebp - 0x18], 0
push 0x64436c
mov edx, dword [ebp + 8]
push edx
call fcn.004021e9
add esp, 4
push eax
call fcn.005b0660
add esp, 8
test eax, eax
jne 0x408686
mov eax, dword [ebp + 8]
push eax
call fcn.004018d4
add esp, 4
mov dword [ebp - 0x10], eax
jmp 0x40868d
mov dword [ebp - 0x10], 0
push 0
mov ecx, dword [ebp - 0x18]
push ecx
push 0
push SQLGetDiagRec
push 3
push 0
push 7
push closesocket
mov edx, dword [ebp + 8]
push edx
call fcn.004020c2
add esp, 0x24
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4086fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 2
je 0x4086f5
cmp dword [ebp - 0x24], 3
je 0x4086f5
cmp dword [ebp - 0x24], 0xf
je 0x4086f5
cmp dword [ebp - 0x24], 0x35
je 0x4086f5
mov eax, dword [ebp - 0x24]
push eax
push 0x644374
mov ecx, dword [ebp + 8]
push ecx
push str.:6:CalculateArchiveCheckSum___s___FAILED:_CreateFileTimeOut___FAILED:__s_ld
call fcn.004018ca
add esp, 0x10
xor eax, eax
jmp 0x408866
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x40872e
push 0x6443d4
mov eax, dword [ebp + 8]
push eax
push str.:7:CalculateArchiveCheckSum___s___EAP:_GetFileSize___FAILED:__s
call fcn.004018ca
add esp, 0xc
mov dword [ebp - 0xc], 0
push 0
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x408760
cmp dword [ebp - 0x1c], 4
jae 0x4087a6
push 0x583
push 0x644428
push 0x644434
mov eax, dword [ebp - 0x14]
push eax
call fcn.00401f5a
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0xc], 0
jbe 0x40879f
push 0x644450
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.:7:CalculateArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_archive_size:_Only_read__ld_bytes:__s
call fcn.00401014
add esp, 0x10
xor eax, eax
jmp 0x408866
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4087c6
cmp dword [ebp - 0x1c], 4
jae 0x408803
push 0x58c
push 0x6444d0
push 0x6444dc
mov eax, dword [ebp - 0x14]
push eax
call fcn.00401f5a
mov dword [ebp - 0x14], 0
push 0x6444f8
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.:7:CalculateArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_Archive_CheckSum:_Only_read__ld_bytes:__s
call fcn.00401014
add esp, 0x10
xor eax, eax
jmp 0x408866
push 1
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0040ae50
add esp, 0xc
mov dword [ebp - 8], eax
push 0x59b
push 0x64457c
push str.CalculateArchiveCheckSum
mov edx, dword [ebp - 0x14]
push edx
call fcn.00401f5a
mov dword [ebp - 0x14], 0
cmp dword [ebp + 0xc], 0
je 0x408845
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
cmp dword [ebp + 0x10], 0
je 0x408853
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [edx], eax
cmp dword [ebp + 0x14], 0
je 0x408861
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 4]
mov dword [ecx], edx
mov eax, 1
mov esp, ebp
pop ebp
ret