Function at 0x409fa0
Capabilities:
Check if file exists
Get file attributes
Print debug messages
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x5a0800]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x409fc1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a1be
test al, 0x10
jne 0x40a1be
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x409fe3
mov eax, dword [esi]
push eax
call fcn.0040c380
mov ecx, dword [0x5a34a4]
add esp, 4
cmp eax, dword [ecx + 8]
jne 0x40a1a0
cmp edx, dword [ecx + 0xc]
jne 0x40a1a0
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.004ea040
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x40a024
mov eax, dword [esi]
push ebx
push edi
push 0
push 0
push 3
push 0
push 1
push 0x120089
push eax
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40a199
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40a083
push 0
lea eax, [ebp - 0x408]
push eax
push 0x10
lea eax, [ebp - 0x128]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a083
cmp dword [ebp - 0x408], 0x10
sete bl
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
test bl, bl
je 0x40a199
cmp dword [esi + 0x14], 7
jbe 0x40a09c
mov esi, dword [esi]
push 0
push 0
push 3
push 0
push 1
push 0x120089
push esi
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a192
push 2
push 0
push 0xffffffffffffffff
push 0xfffffffffffffff0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40a0f9
push 0
lea eax, [ebp - 0x408]
push eax
push 0x10
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a0f9
cmp dword [ebp - 0x408], 0x10
sete bl
push esi
call edi
test bl, bl
je 0x40a192
mov edi, dword [0x5a34a4]
lea edx, [ebp - 0x128]
mov esi, 0xc
lea ecx, [edi + 0x2dc]
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40a18b
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40a120
lea ecx, [edi + 0x2ec]
mov esi, 0xc
lea edx, [ebp - 0x118]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40a16b
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40a142
pop edi
pop ebx
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 4
push str._XIMAO__CheckClient_cmp_tailBuff_error_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 4
push str._XIMAO__CheckClient_cmp_headBuff_error_r_n
jmp 0x40a170
push str._XIMAO__CheckClient_read_tailBuff_error_r_n
jmp 0x40a170
push str._XIMAO__CheckClient_read_headBuff_error_r_n
jmp 0x40a170
push str._XIMAO__CheckClient_archiveSize_error_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 4
push str._XIMAO__CheckClient_Not_ExistFile_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 4