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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff50
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xac], ecx
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040357c
mov eax, dword [ebp - 8]
call fcn.0040357c
xor eax, eax
push ebp
push 0x414556
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.0040338c
test eax, eax
je 0x41451d
mov eax, dword [ebp - 8]
call fcn.0040338c
test eax, eax
je 0x41451d
push 0
lea eax, [ebp - 0x9c]
push eax
mov eax, dword [ebp - 4]
call fcn.0040358c
push eax
call sub.kernel32.dll_OpenFile
mov esi, eax
cmp esi, 0xffffffff
jne 0x414312
push 0x414570
push dword [ebp - 4]
push 0x414580
lea edx, [ebp - 0xa4]
xor eax, eax
call fcn.004057d8
push dword [ebp - 0xa4]
lea eax, [ebp - 0xa0]
mov edx, 4
call fcn.0040344c
mov eax, dword [ebp - 0xa0]
call fcn.0040f91c
jmp 0x41451d
push 0
push esi
call sub.kernel32.dll_GetFileSize
add eax, 5
add eax, 5
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x414220]
call fcn.00403cc8
add esp, 4
mov edx, 0x41927c
mov eax, dword [ebp - 0x14]
mov ecx, 5
call fcn.004043ec
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
lea eax, [eax + edx - 5]
mov edx, 0x419284
mov ecx, 5
call fcn.004043ec
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
sub eax, 5
push eax
mov eax, dword [ebp - 0x14]
add eax, 5
push eax
push esi
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x4143c6
push 0x41458c
push dword [ebp - 4]
push 0x414580
lea edx, [ebp - 0xac]
xor eax, eax
call fcn.004057d8
push dword [ebp - 0xac]
lea eax, [ebp - 0xa8]
mov edx, 4
call fcn.0040344c
mov eax, dword [ebp - 0xa8]
call fcn.0040f91c
jmp 0x41451d
mov eax, 0x41ab68
mov edx, 0x4145a0
call fcn.0040325c
push esi
call sub.kernel32.dll_CloseHandle
cmp dword [ebp - 0xc], 0xa
jbe 0x41446a
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 5]
cmp al, byte [0x41927c]
jne 0x41446a
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 6]
cmp al, byte [0x41927d]
jne 0x41446a
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 7]
cmp al, byte [0x41927e]
jne 0x41446a
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 8]
cmp al, byte [0x41927f]
jne 0x41446a
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 9]
cmp al, byte [0x419280]
jne 0x41446a
push 0x414664
push dword [ebp - 4]
push 0x414674
push dword [ebp - 8]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.0040344c
mov eax, dword [ebp - 0xb0]
call fcn.0040f91c
mov eax, 0x41ab68
mov edx, 0x41468c
call fcn.0040325c
jmp 0x41451d
mov edx, dword [ebp - 0xc]
dec edx
sub edx, 5
jb 0x4144b0
inc edx
mov dword [ebp - 0x10], 5
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
xor byte [eax + ecx], 0xc2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
movzx eax, byte [eax + ecx]
add ax, 0x79
cmp ax, 0xff
jle 0x41449e
sub ax, 0xff
dec eax
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
add ecx, esi
push ecx
pop ecx
mov byte [ecx], al
inc dword [ebp - 0x10]
dec edx
jne 0x41447b
mov eax, dword [ebp - 8]
call fcn.0040338c
test eax, eax
jne 0x4144c7
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004032a0
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 8]
call fcn.0040358c
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x41451d
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x414508
mov bl, 1
push esi
call sub.kernel32.dll_CloseHandle
mov eax, 0x41ab68
mov edx, 0x4146dc
call fcn.0040325c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41455d
lea eax, [ebp - 0xb0]
mov edx, 5
call fcn.0040322c
lea eax, [ebp - 0x14]
mov edx, dword [0x414220]
call fcn.00403cd4
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040322c
ret