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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x4035a3
mov ecx, dword [0x4472e18]
push edi
add eax, ecx
push edi
push eax
push dword [0x40b014]
mov dword [0x42f1e4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.004033f9
cmp edi, eax
jl 0x40369c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
popfd
inc ebp
cld
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x40b014]
call ebx
test eax, eax
je 0x40369c
cmp dword [ebp - 4], esi
jne 0x403798
push dword [ebp + 8]
add dword [0x42f1e4], esi
call 0xf84033f9
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x40369d
cmp dword [ebp + 0x10], edi
jne 0x403667
cmp dword [ebp + 8], edi
dec edi
mov cs, word [edx - 0x42000000]
call 0xbf4078fc
add byte [eax], al
add byte [ecx], bh
jns 0x40361a
mov edi, 0x4000
cmp dword [ecx + 8], edi
jge 0x403617
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
inc ebp
cld
push eax
push edi
push esi
push dword [0x40b014]
call ebx
test eax, eax
je 0x403698
cmp ebp, dword [ebp - 4]
jne 0x403698
imul eax, dword [eax], 0xffffff8d
inc ebp
adc al, 0x50
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test ecx, eax
je 0x403663
cmp dword [ebp + 0x14], edi
jne 0x403663
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x42f1e0], eax
cmp dword [ebp + 8], 0
jg 0x40360a
jmp 0x403693
push 0xfffffffffffffffe
jmp 0x40369a
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 4]
jl 0x403672
or eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
sar bh, 1
jne 0x40368b
push dword [0x40b014]
call ebx
test eax, eax
je 0x403698
mov eax, dword [ebp - 4]
add dword [0x42f1e4], eax
add eax, 0x42f1e4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x40369b
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
push esi
leave
ret 0x210
push edi
cmp ebp, 0x2c754ae4
insb byte es:[edi], dx
xor eax, 0x845094e
mov eax, dword [ebp + 8]
mov ecx, dword [0x41b154]
and eax, 0xffffff82
or dword [0x452ea2], eax
mov eax, dword [ebp - 0xc]
cmp eax, esi
mov dword [0x472e2c], ecx
jg 0x44038b2
test byte [ebp + 8], 8
jne 0x4037d4
test byte [ebp + 8], 4
push ebp
inc ecx
inc dword [ebp - 8]
lea esi, [eax - 4]
cmp edi, esi
jbe 0x4037f0
mov edi, esi
jmp 0x4037f0
cmp esi, dword [0x42f1e0]
jge 0x403805
push edi
push ebx
push dword [ebp - 4]
in al, dx
adc al, 0x3b
add byte [eax], al
mov dword [ebp - 4], eax
add dword [0x41f154], edi
sub esi, edi
test esi, esi
or ecx, dword [edi - 0x800e0]
xor ebx, ebx
push 1
call fcn.0040330e
cmp dword [0x472e2e], ebx
pop ecx
je 0x4038b2
cmp dword [ebp - 8], ebx
je 0x403852
push dword [0x41f154]
call 0x3e33e2
push 4
lea eax, [ebp + 8]
push eax
call fcn.004033b0
test eax, eax
je 0x4038b2
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 8]
jne 0x4038b2
push dword [ebp - 0x10]
push 0x40
not byte [ebp + 0x24]
add dword [eax], 0x427158b1
add byte [ebx + 0x3b1be8f0], cl
add byte [eax], al
push 0x4d70c8
mov word [ebp - 0x22c], es
push eax
call 0x805fe0
push ebx
push 0x4000100
push 0x22
adc edx, dword [ebx + 0x68]
add byte [eax], al
ror byte [ebp - 0x8022b7b], 0xff
push eax
call dword [0x428096]
cmp eax, 0xffffffff
mov dword [0x40b014], eax
jne 0x4038b9
mov eax, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
jmp 0x403936
mov eax, str.Installer_integrity_check_has_failed._Common_causes_include_nincomplete_download_and_damaged_media._Contact_the_ninstallers_author_to_obtain_a_new_copy._n_nMore_information_at:_nhttp:__nsis.sf.net_NSIS_Error
jmp 0x403936
mov cl, 0xc
inc edi
add byte [ebx - 0x17afe340], al
sbb edi, ebx
invalid
pop edi
pop esi
pop ebx
leave
ret 4