Function at 0x406416
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x5f2e68]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x3c], eax
push 8
pop ecx
xor eax, eax
mov byte [ebp - 0x2c], bl
lea edi, [ebp - 0x2b]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
stosb byte es:[edi], al
call fcn.004ccc0d
test eax, eax
jne 0x406673
cmp esi, ebx
je 0x406463
mov dword [esi], ebx
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
je 0x40646c
mov dword [eax], ebx
push dword [ebp - 0x34]
mov esi, 0x5528c8
call fcn.004ccd7a
test eax, eax
pop ecx
jne 0x4064a2
mov esi, dword [ebp - 0x34]
push str..exe
mov dword [ebp - 0x44], 0x4e20
call fcn.004cd54a
push eax
call fcn.005318fe
test eax, eax
pop ecx
pop ecx
je 0x4064a5
xor esi, esi
jmp 0x4064af
mov dword [ebp - 0x44], ebx
mov ecx, dword [ebp - 0x34]
call fcn.00406f62
mov esi, eax
push ebx
push dword [ebp - 0x44]
mov eax, SQLGetDiagRec
push 3
push 7
push 1
push dword [ebp - 0x34]
call fcn.0042eb42
mov edi, eax
add esp, 0x18
cmp edi, 0xffffffff
jne 0x406512
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x406673
cmp eax, 3
je 0x406673
cmp eax, 0xf
je 0x406673
cmp eax, 0x35
je 0x406673
push eax
push str._GetLastError_
push dword [ebp - 0x34]
push str.:6:GetArchiveCheckSum___s___FAILED:_CreateFileTimeOut___FAILED:__s_ld
call fcn.0042bd38
jmp 0x406670
push ebx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x38]
push eax
push edi
call esi
test eax, eax
je 0x406644
cmp dword [ebp - 0x30], 4
jb 0x406644
push ebx
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x40]
push eax
push edi
call esi
test eax, eax
je 0x40662d
cmp dword [ebp - 0x30], 4
jb 0x40662d
push ebx
lea eax, [ebp - 0x30]
push eax
push 8
lea eax, [ebp - 0x48]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x30]
push eax
push 0x20
lea eax, [ebp - 0x2c]
push eax
push edi
call esi
test eax, eax
jne 0x4065a6
call fcn.00435716
push str._GetLastError_
push 0x21
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push str.:4:GetArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_Archive_Validation_String:_Only__ld_bytes_of__ld_could_be_read:__s
call fcn.0042b70b
add esp, 0x14
jmp 0x406673
call fcn.00435716
mov esi, dword [ebp - 0x34]
push 3
push 0xc0000000
mov ecx, esi
call fcn.00434493
mov eax, dword [ebp - 0x30]
cmp eax, 0x22
pop ecx
pop ecx
jb 0x4065da
push eax
push esi
push str.:4:GetArchiveCheckSum___s___FAILED:_AN_IMPOSSIBLE_EXCEPTION_HAS_OCCURRED:_ReadFile___read_too_many_bytes_____Read__ld___
call fcn.0042b70b
add esp, 0xc
jmp 0x406673
mov byte [ebp + eax - 0x2c], bl
lea eax, [ebp - 0x2c]
push str.222PAULAARCHIVE222JesusIAdoreYou
push eax
call fcn.00531180
test eax, eax
pop ecx
pop ecx
je 0x4065fd
push dword [ebp - 0x30]
push esi
push str.:4:GetArchiveCheckSum___s___FAILED:_The_archive_validation_string_was_not_found:_Read__ld_bytes.
jmp 0x4065cd
mov ecx, dword [ebp - 0x38]
cmp ecx, ebx
jne 0x406613
push esi
push str.GetArchiveCheckSum___s___FAILED:_The_archive_size_was_found_to_be_zero.
call fcn.0042b70b
pop ecx
pop ecx
jmp 0x406673
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
je 0x40661f
mov edx, dword [ebp - 0x40]
mov dword [eax], edx
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
je 0x406628
mov dword [eax], ecx
xor eax, eax
inc eax
jmp 0x406675
call fcn.00435716
push str._GetLastError_
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push str.:7:GetArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_Archive_CheckSum:_Only_read__ld_bytes:__s
jmp 0x40666b
call fcn.00435716
push dword [ebp - 0x44]
mov ecx, dword [ebp - 0x34]
xor edx, edx
call fcn.004328fa
test eax, eax
pop ecx
jbe 0x406673
push str._GetLastError_
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push str.:7:GetArchiveCheckSum___s___FAILED:_ReadFile___FAILED_to_read_the_archive_size:_Only_read__ld_bytes:__s
call fcn.0042b70b
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret