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

Disassembly:
push ecx
mov eax, dword [esp + 8]
test eax, eax
push ebx
mov ebx, ecx
mov dword [esp + 4], ebx
jne 0x40879a
mov eax, 0x57
pop ebx
pop ecx
ret 4
push ebp
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4087c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ebp
pop ebx
pop ecx
ret 4
push edi
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x4087ea
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
mov eax, 0xd
pop ebx
pop ecx
ret 4
lea eax, [edi + 2]
push esi
push eax
call fcn.0040f6e7
mov esi, eax
add esp, 4
test esi, esi
jne 0x408811
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
mov eax, 8
pop ebx
pop ecx
ret 4
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408847
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.0040f5cf
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, edi
pop edi
pop ebp
pop ebx
pop ecx
ret 4
push ebp
mov byte [esi + edi], 0
mov byte [esi + edi + 1], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, dword [esp + 0x18]
jbe 0x408873
push esi
call fcn.0040f5cf
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0x1e
pop ebx
pop ecx
ret 4
cmp edi, 3
mov ebp, 0xd
jbe 0x408a70
mov cl, byte [esi]
test cl, cl
mov ebp, 0x32
mov dl, 0xfe
jne 0x4088a4
mov al, byte [esi + 1]
test al, al
jne 0x4088a4
cmp byte [esi + 2], dl
jne 0x4088a4
cmp byte [esi + 3], 0xff
je 0x408a70
cmp cl, 0xff
jne 0x4088c0
cmp byte [esi + 1], dl
jne 0x4088c0
mov al, byte [esi + 2]
test al, al
jne 0x4088c0
mov al, byte [esi + 3]
test al, al
je 0x408a70
test cl, cl
jne 0x4088da
mov al, byte [esi + 1]
test al, al
jne 0x4088da
cmp byte [esi + 2], 0xff
jne 0x4088da
cmp byte [esi + 3], dl
je 0x408a70
cmp cl, dl
jne 0x4088f6
cmp byte [esi + 1], 0xff
jne 0x4088f6
mov al, byte [esi + 2]
test al, al
jne 0x4088f6
mov al, byte [esi + 3]
test al, al
je 0x408a70
cmp cl, 0xef
jne 0x408927
cmp byte [esi + 1], 0xbb
jne 0x408927
cmp byte [esi + 2], 0xbf
jne 0x408927
lea edx, [esi + 3]
push edx
mov ecx, ebx
call fcn.00408600
push esi
mov ebp, eax
call fcn.0040f5cf
add esp, 4
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
cmp cl, 0xff
jne 0x408952
mov bl, byte [esi + 1]
cmp bl, dl
lea eax, [esi + 1]
jne 0x408952
mov cl, byte [eax - 1]
test cl, cl
jne 0x408946
cmp byte [eax], 0
je 0x408a70
mov dl, byte [eax]
mov byte [eax - 1], dl
mov byte [eax], cl
add eax, 2
jmp 0x408936
cmp cl, dl
jne 0x408960
cmp byte [esi + 1], 0xff
je 0x408a70
test cl, cl
mov bl, 0x3c
jne 0x40897d
mov al, byte [esi + 1]
test al, al
jne 0x40897d
mov al, byte [esi + 2]
test al, al
jne 0x40897d
cmp byte [esi + 3], bl
je 0x408a70
cmp cl, bl
jne 0x40899a
mov al, byte [esi + 1]
test al, al
jne 0x40899a
mov al, byte [esi + 2]
test al, al
jne 0x40899a
mov al, byte [esi + 3]
test al, al
je 0x408a70
test cl, cl
mov dl, 0x3f
jne 0x4089dd
mov al, byte [esi + 1]
test al, al
jne 0x4089b5
cmp byte [esi + 2], bl
jne 0x4089b5
cmp byte [esi + 3], al
je 0x408a70
cmp al, bl
jne 0x4089dd
cmp byte [esi + 2], 0
jne 0x4089c9
cmp byte [esi + 3], 0
je 0x408a70
cmp al, bl
jne 0x4089dd
mov al, byte [esi + 2]
test al, al
jne 0x4089dd
cmp byte [esi + 3], dl
je 0x408a70
cmp cl, bl
jne 0x408a23
mov al, byte [esi + 1]
test al, al
jne 0x4089f4
cmp byte [esi + 2], dl
jne 0x4089f4
mov bl, byte [esi + 3]
test bl, bl
je 0x408a70
cmp al, dl
jne 0x408a23
cmp byte [esi + 2], 0x78
jne 0x408a23
cmp byte [esi + 3], 0x6d
jne 0x408a23
mov ecx, dword [esp + 0x10]
push esi
call fcn.00408600
push esi
mov ebp, eax
call fcn.0040f5cf
add esp, 4
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
cmp cl, 0x4c
jne 0x408a3a
cmp byte [esi + 1], 0x6f
jne 0x408a3a
cmp byte [esi + 2], 0xa7
jne 0x408a3a
cmp byte [esi + 3], 0x94
je 0x408a70
push str.__xml
push esi
call fcn.00410400
add esp, 8
test eax, eax
je 0x408a6b
mov ecx, dword [esp + 0x10]
push eax
call fcn.00408600
push esi
mov ebp, eax
call fcn.0040f5cf
add esp, 4
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4
mov ebp, 0xd
push esi
call fcn.0040f5cf
add esp, 4
pop esi
pop edi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 4