Function at 0x40e518
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push ebx
push esi
push edi
lea edi, [ebp - 6]
lea esi, str.zSLF
mov ecx, 3
rep movsw word es:[edi], word [esi]
inc dword [ebp - 6]
push 0x8000
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0xc], eax
or eax, eax
jne 0x40e566
push 0x10
push str.Error...
push str.Out_of_memory
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40e928
push 0x100
lea eax, [ebp - 0x114]
push eax
push dword [0x41fee8]
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x4217d6
lea eax, [ebp - 0x114]
push eax
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 0x10], eax
or eax, eax
jne 0x40e5bd
push 0x10
push str.Error...
push str.This_SFX_is_damaged__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
xor eax, eax
jmp 0x40e928
push 0
push 0x7530
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fseek
add esp, 0xc
or eax, eax
je 0x40e603
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e928
mov ecx, 0x1ffe
xor eax, eax
mov edi, dword [ebp - 0xc]
rep stosd dword es:[edi], eax
push dword [ebp - 0x10]
push 0x7ff8
push 1
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_fread
add esp, 0x10
or eax, eax
jne 0x40e658
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e928
mov ebx, dword [ebp - 0xc]
jmp 0x40e699
inc ebx
mov eax, dword [ebp - 0xc]
add eax, 0x7ff6
cmp ebx, eax
ja 0x40e6ba
movsx eax, byte [ebx]
movsx edx, byte [ebp - 5]
cmp eax, edx
jne 0x40e699
movsx eax, byte [ebx + 1]
movsx edx, byte [ebp - 4]
cmp eax, edx
jne 0x40e699
movsx eax, byte [ebx + 2]
movsx edx, byte [ebp - 3]
cmp eax, edx
jne 0x40e699
movsx eax, byte [ebx + 3]
movsx edx, byte [ebp - 2]
cmp eax, edx
je 0x40e6ba
mov eax, 0x7ff8
mov edx, ebx
sub edx, dword [ebp - 0xc]
sub eax, edx
push eax
movsx eax, byte [ebp - 6]
push eax
push ebx
call sub.CRTDLL.DLL_memchr
add esp, 0xc
mov ebx, eax
or eax, eax
jne 0x40e65d
or ebx, ebx
jne 0x40e6e3
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
xor eax, eax
jmp 0x40e928
mov eax, ebx
sub eax, dword [ebp - 0xc]
add eax, 0x752f
mov dword [ebp - 0x14], eax
push 0
push eax
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fseek
push dword [ebp - 0x10]
push 1
push 0xd
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_fread
add esp, 0x1c
or eax, eax
jne 0x40e741
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e928
push 5
lea eax, [ebp - 6]
push eax
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_memcmp
add esp, 0xc
or eax, eax
je 0x40e786
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e928
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 5]
mov eax, dword [eax + 9]
mov dword [ebp - 0x11c], eax
push ebx
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_realloc
add esp, 8
mov dword [ebp - 0xc], eax
or eax, eax
jne 0x40e7cd
push 0x10
push str.Error...
push str.Out_of_memory
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e928
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fseek
push dword [ebp - 0x10]
push 1
push ebx
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_fread
add esp, 0x1c
or eax, eax
jne 0x40e81f
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
xor eax, eax
jmp 0x40e928
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 4
mov eax, ebx
sub eax, 0xd
push eax
mov eax, dword [ebp - 0xc]
add eax, 0xd
push eax
call fcn.0041059a
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x11c], eax
je 0x40e8af
push 0x5c
lea eax, [ebp - 0x114]
push eax
call sub.CRTDLL.DLL_strrchr
add esp, 8
or eax, eax
je 0x40e8af
push 0x5c
lea eax, [ebp - 0x114]
push eax
call sub.CRTDLL.DLL_strrchr
add esp, 8
push str.test.exe
mov edi, eax
inc edi
push edi
call sub.CRTDLL.DLL__stricmp
add esp, 8
or eax, eax
jne 0x40e88d
cmp dword [ebp - 0x11c], eax
je 0x40e8af
push 0x10
push str.Error...
push str.This_SFX_is_damaged__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
xor eax, eax
jmp 0x40e928
mov eax, ebx
sub eax, 0xd
push eax
mov eax, dword [ebp - 0xc]
add eax, 0xd
push eax
call fcn.0040e92d
add esp, 8
mov dword [ebp - 0x118], eax
or eax, eax
jge 0x40e912
cmp eax, 0xffffffff
jne 0x40e8e8
push 0x10
push str.Error...
push str.Out_of_memory
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x40e8fb
push 0x10
push str.Error...
push str.Incorrect_file_size__please_try_to_download_this_file_again.
push 0
call sub.USER32.DLL_MessageBoxA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fclose
add esp, 8
xor eax, eax
jmp 0x40e928
mov eax, dword [ebp - 0x14]
add eax, ebx
mov dword [0x42031c], eax
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret