Function at 0x40ebf6
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdf0
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov dword [edi + 0x115], 0x200
push dword [ebp + 0xc]
push edi
call sub.KERNEL32.dll_lstrcpyA
mov byte [edi + 0x114], bl
mov eax, edi
push 0x2e
inc eax
push eax
call fcn.00416ee9
add esp, 8
test eax, eax
je 0x40ec35
mov esi, eax
test eax, eax
jne 0x40ec23
push ebx
call fcn.0040eaff
pop ecx
test eax, eax
je 0x40ec4b
mov eax, 0x423834
jmp 0x40ec50
mov eax, 0x423838
push eax
lea edx, [esi + 1]
push edx
call sub.KERNEL32.dll_lstrcpyA
cmp byte [edi + 0x114], 0xe5
jne 0x40ec72
push 0x42383c
inc esi
push esi
call fcn.00416db4
add esp, 8
push edi
call fcn.0040eb7c
pop ecx
cmp dword [edi + 0x110], 0xffffffff
je 0x40eec0
lea eax, [ebp - 4]
push eax
push dword [edi + 0x110]
call sub.KERNEL32.dll_GetFileSize
test eax, eax
je 0x40edb3
push 0
push 0
push 0
push 0
push dword [edi + 0x110]
call fcn.00401165
add esp, 0x14
push 0
lea edx, [ebp - 4]
push edx
push 0x200
lea ecx, [ebp - 0x210]
push ecx
push dword [edi + 0x110]
call sub.KERNEL32.dll_ReadFile
push 8
lea eax, [ebp - 0x208]
push eax
lea edx, [ebp - 0x10]
push edx
call fcn.00416bc4
add esp, 0xc
mov byte [ebp - 8], 0
push 0xff
push dword [0x429490]
push 0x429cfc
call fcn.0041204f
pop ecx
add eax, 4
push eax
call sub.COMDLG32.dll_GetFileTitleA
push 0x2e
push dword [0x429490]
call fcn.00416ee9
add esp, 8
test eax, eax
je 0x40ed1f
mov byte [eax], 0
mov cl, byte [edi + 0x114]
push ecx
call fcn.0040eaff
pop ecx
test eax, eax
je 0x40ed4b
lea eax, [ebp - 0x20a]
push eax
call fcn.0040eb20
pop ecx
movsx edx, ax
mov dword [edi + 0x115], edx
jmp 0x40eec0
cmp byte [edi + 0x114], 0x8b
jne 0x40ed95
lea ecx, [ebp - 0x1fe]
push ecx
call fcn.0040eb20
pop ecx
movsx eax, ax
mov dword [edi + 0x115], eax
test byte [edi + 0x115], 1
je 0x40ed79
dec dword [edi + 0x115]
cmp dword [edi + 0x115], 0
jne 0x40eec0
mov dword [edi + 0x115], 0x200
jmp 0x40eec0
cmp byte [edi + 0x114], 0xe5
jne 0x40eec0
mov edx, dword [ebp - 0x20c]
mov dword [edi + 0x115], edx
jmp 0x40eec0
push 0x200
push 0
lea ecx, [ebp - 0x210]
push ecx
call fcn.00416c34
add esp, 0xc
mov al, byte [edi + 0x114]
push eax
call fcn.0040eaff
pop ecx
test eax, eax
je 0x40ee26
mov dword [edi + 0x115], 0x40
mov eax, 0x200
cdq
idiv dword [edi + 0x115]
mov dword [edi + 0x104], eax
mov cx, word [edi + 0x115]
push ecx
lea eax, [ebp - 0x20a]
push eax
call fcn.0040eb3b
add esp, 8
movsx edx, word [edi + 0x104]
push edx
lea ecx, [ebp - 0x210]
push ecx
call fcn.0040ead8
add esp, 8
jmp 0x40eea3
cmp byte [edi + 0x114], 0x8b
je 0x40ee38
test byte [edi + 0x114], 0x88
je 0x40ee9c
mov dword [edi + 0x115], 0x200
mov dword [edi + 0x104], 1
push 0xff
push dword [0x429490]
push 0x429cfc
call fcn.0041204f
pop ecx
add eax, 4
push eax
call sub.COMDLG32.dll_GetFileTitleA
push 0x2e
push dword [0x429490]
call fcn.00416ee9
add esp, 8
test eax, eax
je 0x40ee82
mov byte [eax], 0
mov ax, word [edi + 0x115]
mov word [ebp - 0x1fc], ax
mov dword [ebp - 0x210], 1
jmp 0x40eea3
mov byte [ebp - 0x200], 3
push 0
lea edx, [ebp - 4]
push edx
push 0x200
lea ecx, [ebp - 0x210]
push ecx
push dword [edi + 0x110]
call sub.KERNEL32.dll_WriteFile
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret