Function at 0x405ad6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov ecx, 0x87
dec ecx
mov dword [esp + ecx*4], 0xfffa5a5a
jne 0x405ae4
push edi
mov dword [ebp - 0x114], 0
push 0x45e205
push dword [ebp + 8]
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 4], eax
cmp eax, 0
je 0x405e5f
push 2
push 0
push dword [ebp - 4]
call sub.CRTDLL.DLL_fseek
add esp, 0xc
push dword [ebp - 4]
call sub.CRTDLL.DLL_ftell
add esp, 4
mov dword [ebp - 8], eax
push dword [ebp - 4]
call sub.CRTDLL.DLL_rewind
add esp, 4
mov edi, dword [ebp - 8]
add edi, 2
push edi
push 0x40
call sub.KERNEL32.dll_GlobalAlloc
mov dword [ebp - 0x10], eax
cmp eax, 0
jne 0x405b6d
push dword [ebp - 4]
call sub.CRTDLL.DLL_fclose
add esp, 4
mov dword [0x41f00c], 0xffffffff
jmp 0x405e69
push dword [ebp - 4]
push dword [ebp - 8]
push 1
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fread
add esp, 0x10
push dword [ebp - 4]
call sub.CRTDLL.DLL_fclose
add esp, 4
push 0x2e
push dword [ebp + 8]
call sub.CRTDLL.DLL_strrchr
add esp, 8
mov dword [ebp - 0x118], eax
push str..EMC
push dword [ebp - 0x118]
call sub.CRTDLL.DLL__stricmp
add esp, 8
cmp eax, 0
je 0x405c3a
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.00405521
add esp, 8
mov dword [ebp - 8], eax
push str.remove_spacescomments_and_insert_PIP_pictures_r_n
push dword [0x41f004]
call fcn.00406494
add esp, 8
push 0
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.00405a36
add esp, 0xc
mov dword [ebp - 0x114], eax
push dword [ebp - 0x114]
push 0x40
call sub.KERNEL32.dll_GlobalAlloc
mov dword [ebp - 0x21c], eax
cmp eax, 0
je 0x405c3a
push dword [ebp - 0x21c]
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.00405a36
add esp, 0xc
push dword [ebp - 0x10]
call sub.KERNEL32.dll_GlobalFree
mov edi, dword [ebp - 0x21c]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x114]
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0x118]
mov byte [edi], 0
push str..emc
push dword [ebp + 8]
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0x5c
push dword [ebp + 8]
call sub.CRTDLL.DLL_strrchr
add esp, 8
mov dword [ebp - 0xc], eax
cmp eax, 0
je 0x405c6e
add dword [ebp - 0xc], 1
jmp 0x405c74
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], edi
cmp dword [0x45dd38], 4
jne 0x405d7c
push str.__temp
lea edi, [ebp - 0x218]
push edi
call fcn.0041ae2d
add esp, 8
push dword [ebp - 0xc]
lea edi, [ebp - 0x218]
push edi
push str.Create_file_on_SDcard:___s__s__r_n
push dword [0x41f004]
call fcn.00406494
add esp, 0x10
push dword [ebp - 8]
push str.send__d_bytes_r_n
push dword [0x41f004]
call fcn.00406494
add esp, 0xc
push dword [ebp - 8]
push dword [ebp - 0xc]
lea edi, [ebp - 0x218]
push edi
lea edi, [ebp - 0x218]
push edi
push str.FDC__s__nFWO__s__s_0_nFWD_d_
lea edi, [ebp - 0x110]
push edi
call fcn.0041adb1
add esp, 0x18
lea edi, [ebp - 0x110]
push edi
call fcn.0041aea4
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.00404de5
add esp, 8
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.00404de5
add esp, 8
push dword [ebp - 0xc]
lea edi, [ebp - 0x218]
push edi
push str._nFWC_nMRN__s__s__n
lea edi, [ebp - 0x110]
push edi
call fcn.0041adb1
add esp, 0x10
lea edi, [ebp - 0x110]
push edi
call fcn.0041aea4
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.00404de5
add esp, 8
push dword [ebp - 0xc]
lea edi, [ebp - 0x218]
push edi
push str._nStart_macro___s__s__r_n
push dword [0x41f004]
call fcn.00406494
add esp, 0x10
jmp 0x405e49
mov edi, dword [0x45dd38]
cmp edi, 5
je 0x405d90
cmp edi, 6
jne 0x405e49
push dword [ebp - 8]
push str.MRR_d_
lea edi, [ebp - 0x110]
push edi
call fcn.0041adb1
add esp, 0xc
push dword [ebp - 0xc]
push str.Load_macrofile__s_to_RAM_r_n
push dword [0x41f004]
call fcn.00406494
add esp, 0xc
push dword [ebp - 8]
push str.send__d_bytes_r_n
push dword [0x41f004]
call fcn.00406494
add esp, 0xc
lea edi, [ebp - 0x110]
push edi
call fcn.0041aea4
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.00404de5
add esp, 8
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.00404de5
add esp, 8
push 0x45e123
lea edi, [ebp - 0x110]
push edi
call fcn.0041adb1
add esp, 8
lea edi, [ebp - 0x110]
push edi
call fcn.0041aea4
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.00404de5
add esp, 8
push dword [ebp - 0xc]
push str._nStart_macro__s_r_n
push dword [0x41f004]
call fcn.00406494
add esp, 0xc
mov edi, dword [0x41f008]
mov dword [0x41f00c], edi
push dword [ebp - 0x10]
call sub.KERNEL32.dll_GlobalFree
jmp 0x405e69
mov dword [0x41f00c], 0xffffffff
pop edi
leave
ret