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

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x42d101
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 4]
lea eax, [eax + eax*8]
mov edx, dword [0x443ca8]
mov eax, dword [edx + eax*4 + 0xc]
lea edx, [ebp - 0x18]
call fcn.00422dbc
mov eax, dword [ebp - 0x18]
mov edx, dword [ebx + 4]
lea edx, [edx + edx*8]
mov ecx, dword [0x443ca8]
mov edx, dword [ecx + edx*4 + 8]
mov ecx, dword [0x443bf8]
mov ecx, dword [ecx]
lea ecx, [ecx + ecx*8]
mov esi, dword [0x443b18]
lea ecx, [esi + ecx*4]
mov edx, dword [ecx + edx*4 - 0x14]
lea ecx, [ebp - 0x10]
call fcn.00423010
lea eax, [ebp - 4]
mov edx, dword [ebx + 4]
lea edx, [edx + edx*8]
mov ecx, dword [0x443ca8]
mov edx, dword [ecx + edx*4 + 4]
mov ecx, 0
call fcn.00406a68
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x10]
call fcn.00406e8c
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
cmp esi, 0xffffffff
jne 0x42cf79
or ebx, 0xffffffff
jmp 0x42d0d6
push 0
push esi
call sub.kernel32.dll_GetFileSize
mov edi, eax
test edi, edi
jge 0x42cf91
mov ebx, 0xfffffffe
jmp 0x42d0d6
lea eax, [ebp - 8]
xor ecx, ecx
mov edx, edi
call fcn.00406c70
push 0
lea eax, [ebp - 0x14]
push eax
push edi
mov eax, dword [ebp - 8]
push eax
push esi
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 8]
call fcn.00406bac
push eax
call sub.user32.dll_CharLowerA
mov edi, dword [ebp - 4]
test edi, edi
je 0x42cfc8
sub edi, 4
mov edi, dword [edi]
push 0
mov eax, dword [ebp - 4]
call fcn.00406bac
mov edx, eax
lea eax, [ebp - 0xc]
mov ecx, edi
call fcn.004065d4
mov eax, dword [ebp - 0xc]
call fcn.00406bac
push eax
call sub.user32.dll_CharLowerA
lea eax, [ebx + 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, 0x42d120
call fcn.00407064
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
call fcn.0042211c
test eax, eax
jne 0x42d0c1
lea eax, [ebp - 4]
mov edx, 0x42d150
call fcn.00406ad4
mov edx, dword [ebp - 8]
mov eax, edx
test eax, eax
je 0x42d02a
sub eax, 4
mov eax, dword [eax]
dec eax
jle 0x42d045
mov eax, edx
test eax, eax
je 0x42d038
sub eax, 4
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
cmp byte [ecx + eax - 2], 0xd
sete al
jmp 0x42d047
xor eax, eax
test al, al
je 0x42d063
mov eax, edx
test eax, eax
je 0x42d056
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 8]
cmp byte [edx + eax - 1], 0xa
sete al
jmp 0x42d065
xor eax, eax
test al, al
je 0x42d074
mov eax, dword [ebp - 4]
cmp byte [eax], 0xd
sete al
jmp 0x42d076
xor eax, eax
test al, al
je 0x42d095
mov eax, dword [ebp - 4]
cmp byte [eax + 1], 0xa
jne 0x42d095
lea eax, [ebp - 4]
mov ecx, 2
mov edx, 1
call fcn.00406c24
mov eax, dword [ebp - 4]
test eax, eax
je 0x42d0a1
sub eax, 4
mov eax, dword [eax]
push 0
lea edx, [ebp - 0x14]
push edx
push eax
mov eax, dword [ebp - 4]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
lea eax, [ebx + 0x10]
mov edx, 0x42d160
call fcn.0040700c
jmp 0x42d0ce
lea eax, [ebx + 0x10]
mov edx, 0x42d184
call fcn.0040700c
push esi
call sub.kernel32.dll_CloseHandle_1
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x42d108
lea eax, [ebp - 0x18]
call fcn.00406428
lea eax, [ebp - 0x10]
call fcn.00406428
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004064b8
ret