Function at 0x408f00
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x46c
mov eax, dword [0x472128]
xor eax, esp
mov dword [esp + 0x468], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [esp + 0x7c]
push esi
push edi
push 0x3ec
mov esi, ecx
mov dword [esp + 0x28], ebx
push 0
push eax
mov dword [esp + 0x28], esi
call fcn.00438710
mov eax, dword [str.FIDEL.CA]
lea ecx, [esp + 0x7c]
mov dword [esp + 0x7c], eax
add esp, 0xc
mov eax, dword [0x46b320]
xorps xmm0, xmm0
mov dword [esp + 0x74], eax
mov eax, dword [0x4802b0]
mov dword [esp + 0x80], eax
lea eax, [esi + 0x9c]
push eax
mov dword [esp + 0x7c], 0x400
mov dword [esp + 0x80], 5
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], 0
movlpd qword [esp + 0x2c], xmm0
call fcn.00408890
mov edx, dword [esp + 0x84]
lea eax, [esp + 0x28]
mov edi, dword [ebp + 0xc]
or edx, 1
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call fcn.00408dd0
test al, al
je 0x40901f
push 0
push 0
xorps xmm0, xmm0
or edx, edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
movlpd qword [esp + 0x48], xmm0
push dword [esp + 0x4c]
mov dword [esp + 0x90], edx
push dword [esp + 0x4c]
push dword [ebx]
call edi
test eax, eax
jne 0x408ff3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 4], eax
push 0
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0
push eax
push 0x400
push dword [esi]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x409038
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebx + 4], eax
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x468]
xor ecx, esp
call fcn.00421234
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi]
cmp dword [eax], 0x45444946
jne 0x40904b
cmp dword [eax + 4], 0x41432e4c
je 0x40901f
push 2
push 0
xorps xmm0, xmm0
movlpd qword [esp + 0x38], xmm0
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push dword [ebx]
call edi
test eax, eax
jne 0x409072
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebx + 4], eax
push 0
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
push 0x400
push dword [esi]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40909c
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40901c
push 0
push 0
xorps xmm0, xmm0
movlpd qword [esp + 0x38], xmm0
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push dword [ebx]
call edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4090c4
call edi
mov dword [ebx + 4], eax
push 0
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
push 0x400
lea eax, [esp + 0x7c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4090ee
call edi
mov dword [ebx + 4], eax
mov ecx, 0x400
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
nop dword [eax]
mov dword [esp + 0x54], eax
xorps xmm0, xmm0
lea eax, [esp + 0x48]
mov dword [esp + 0x3c], 0
push eax
lea eax, [esp + 0x40]
movlpd qword [esp + 0x4c], xmm0
push eax
push dword [esp + 0x18]
mov dword [esp + 0x64], 0
push dword [esi]
mov dword [esp + 0x60], ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40921b
mov eax, dword [esp + 0x3c]
mov ecx, dword [esi + 8]
mov edi, dword [esi]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], ecx
test eax, eax
jle 0x40919a
lea edx, [esi + 0x10]
mov ebx, eax
nop dword [eax + eax]
mov eax, dword [esi + 0xc]
mov esi, ebx
cmp ebx, eax
push ecx
cmovge esi, eax
push esi
push edi
push edx
call fcn.0040a410
push esi
push dword [esp + 0x4c]
push edi
call fcn.00438190
mov ecx, dword [esp + 0x54]
add edi, esi
sub ebx, esi
add esp, 0x1c
mov esi, dword [esp + 0x1c]
lea edx, [esi + 0x10]
test ebx, ebx
jg 0x409160
mov edi, dword [esi]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
xorps xmm0, xmm0
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push eax
push dword [esp + 0x38]
movlpd qword [esp + 0x68], xmm0
push edi
push dword [ebx]
mov dword [esp + 0x80], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40921b
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x30], eax
jne 0x409224
add eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], ecx
adc eax, 0
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x2c]
jg 0x409224
jl 0x409100
cmp ecx, dword [esp + 0x28]
jae 0x409224
jmp 0x409100
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 4], eax
mov ecx, dword [esp + 0x474]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00421234
mov esp, ebp
pop ebp
ret 8