Function at 0x40ed96
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 0x40eda4
push edi
mov dword [ebp - 0x114], 0
push 0x436679
push dword [ebp + 8]
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 4], eax
cmp eax, 0
je 0x40f11f
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 0x40ee2d
push dword [ebp - 4]
call sub.CRTDLL.DLL_fclose
add esp, 4
mov dword [0x420230], 0xffffffff
jmp 0x40f129
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 0x40eefa
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.0040e7e1
add esp, 8
mov dword [ebp - 8], eax
push str.remove_spacescomments_and_insert_PIP_pictures_r_n
push dword [0x420228]
call fcn.0040f754
add esp, 8
push 0
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.0040ecf6
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 0x40eefa
push dword [ebp - 0x21c]
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.0040ecf6
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 0x40ef2e
add dword [ebp - 0xc], 1
jmp 0x40ef34
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], edi
cmp dword [0x45f4d0], 4
jne 0x40f03c
push str.__temp
lea edi, [ebp - 0x218]
push edi
call fcn.0041aecd
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 [0x420228]
call fcn.0040f754
add esp, 0x10
push dword [ebp - 8]
push str.send__d_bytes_r_n
push dword [0x420228]
call fcn.0040f754
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.0041ae51
add esp, 0x18
lea edi, [ebp - 0x110]
push edi
call fcn.0041af44
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.0040e0a5
add esp, 8
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.0040e0a5
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.0041ae51
add esp, 0x10
lea edi, [ebp - 0x110]
push edi
call fcn.0041af44
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.0040e0a5
add esp, 8
push dword [ebp - 0xc]
lea edi, [ebp - 0x218]
push edi
push str._nStart_macro___s__s__r_n
push dword [0x420228]
call fcn.0040f754
add esp, 0x10
jmp 0x40f109
mov edi, dword [0x45f4d0]
cmp edi, 5
je 0x40f050
cmp edi, 6
jne 0x40f109
push dword [ebp - 8]
push str.MRR_d_
lea edi, [ebp - 0x110]
push edi
call fcn.0041ae51
add esp, 0xc
push dword [ebp - 0xc]
push str.Load_macrofile__s_to_RAM_r_n
push dword [0x420228]
call fcn.0040f754
add esp, 0xc
push dword [ebp - 8]
push str.send__d_bytes_r_n
push dword [0x420228]
call fcn.0040f754
add esp, 0xc
lea edi, [ebp - 0x110]
push edi
call fcn.0041af44
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.0040e0a5
add esp, 8
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.0040e0a5
add esp, 8
push 0x436597
lea edi, [ebp - 0x110]
push edi
call fcn.0041ae51
add esp, 8
lea edi, [ebp - 0x110]
push edi
call fcn.0041af44
add esp, 4
push eax
lea edi, [ebp - 0x110]
push edi
call fcn.0040e0a5
add esp, 8
push dword [ebp - 0xc]
push str._nStart_macro__s_r_n
push dword [0x420228]
call fcn.0040f754
add esp, 0xc
mov edi, dword [0x42022c]
mov dword [0x420230], edi
push dword [ebp - 0x10]
call sub.KERNEL32.dll_GlobalFree
jmp 0x40f129
mov dword [0x420230], 0xffffffff
pop edi
leave
ret