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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415326
mov eax, dword fs:[0]
push eax
mov eax, 0x2048
call fcn.00411180
mov eax, dword [0x420534]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x204c], eax
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2040]
add eax, 0x3c
mov dword [ebp - 0x2048], esi
push eax
add esi, 0x14
call fcn.00401b00
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [ebp - 4], 0
jb 0x4082c6
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x2040]
push eax
call fcn.0040af00
push esi
call fcn.004086a0
add esp, 0xc
test al, al
je 0x40830f
lea eax, [ebp - 0x2040]
push eax
lea eax, [ebp - 0x2028]
push eax
call fcn.0040b100
push eax
mov byte [ebp - 4], 1
call fcn.00407c90
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2028]
call fcn.00402900
cmp dword [ebp - 0x202c], 8
lea edx, [ebp - 0x2040]
mov dword [ebp - 0x2018], 0
cmovae edx, dword [ebp - 0x2040]
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x2014], 7
mov word [ebp - 0x2028], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408345
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2028]
call fcn.00404eb0
cmp dword [ebp - 0x2014], 8
lea eax, [ebp - 0x2028]
push 0x416fec
cmovae eax, dword [ebp - 0x2028]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__wfopen
mov edx, dword [ebp - 0x2014]
add esp, 8
mov ebx, eax
mov dword [ebp - 0x2044], ebx
cmp edx, 8
jb 0x4083cb
mov ecx, dword [ebp - 0x2028]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4083c1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408508
push edx
push ecx
call fcn.00411118
add esp, 8
xor eax, eax
mov dword [ebp - 0x2018], 0
mov dword [ebp - 0x2014], 7
mov word [ebp - 0x2028], ax
test ebx, ebx
je 0x40850d
lea ecx, [ebp - 0x2040]
mov dword [ebp - 4], 0xffffffff
call fcn.00402900
mov ecx, dword [ebp - 0x2048]
push 0
mov eax, dword [ecx + 4]
push dword [ecx]
mov edi, dword [ecx + 8]
mov ebx, dword [ecx + 0xc]
mov dword [ebp - 0x2050], eax
mov eax, dword [ebp - 0x204c]
push dword [eax]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
jne 0x40854e
test ebx, ebx
jg 0x40844b
jl 0x408441
cmp edi, 0x2000
ja 0x40844b
mov esi, edi
mov dword [ebp - 0x2048], ebx
jmp 0x40845a
mov esi, 0x2000
mov dword [ebp - 0x2048], 0
mov eax, dword [ebp - 0x204c]
push dword [eax]
lea eax, [ebp - 0x2010]
push esi
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, esi
jne 0x4084d6
push dword [ebp - 0x2044]
lea eax, [ebp - 0x2010]
push esi
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, esi
jne 0x408580
sub edi, esi
sbb ebx, dword [ebp - 0x2048]
test ebx, ebx
jg 0x40844b
jl 0x4084aa
test edi, edi
jne 0x408433
push dword [ebp - 0x2044]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411126
mov esp, ebp
pop ebp
ret 4
push str.Failure_processing_application_bundle__possible_file_corruption.
call fcn.0040a570
push str.I_O_failure_reading_contents_of_the_bundle.
call fcn.0040a570
add esp, 8
mov dword [ebp - 0x2044], 0x800080a0
lea eax, [ebp - 0x2044]
push 0x41e1d0
push eax
call fcn.004120a7
call sub.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn
push str.Failure_processing_application_bundle.
call fcn.0040a570
add esp, 4
lea ecx, [ebp - 0x2040]
call fcn.00407a90
push eax
push str.Failed_to_open_file___s__for_writing
call fcn.0040a570
add esp, 8
mov dword [ebp - 0x2044], 0x800080a0
lea eax, [ebp - 0x2044]
push 0x41e1d0
push eax
call fcn.004120a7
push str.Failure_processing_application_bundle__possible_file_corruption.
call fcn.0040a570
push str.I_O_seek_failure_within_the_bundle.
call fcn.0040a570
add esp, 8
mov dword [ebp - 0x2044], 0x800080a0
lea eax, [ebp - 0x2044]
push 0x41e1d0
push eax
call fcn.004120a7
push str.Failure_extracting_contents_of_the_application_bundle.
call fcn.0040a570
push str.I_O_failure_when_writing_extracted_files.
call fcn.0040a570
add esp, 8
mov dword [ebp - 0x2050], 0x800080a0
lea eax, [ebp - 0x2050]
push 0x41e1d0
push eax
call fcn.004120a7
int3