Function at 0x42e13e
Capabilities:
Clear file content
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48865c
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x4970c0]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push esi
push edi
mov eax, dword [0x4970c0]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x28], ecx
jne 0x42e197
xor al, al
jmp 0x42e40a
mov ecx, 0x41edbe
xor ebx, ebx
test ecx, ecx
jne 0x42e1ab
mov dword [esp + 0x84], ebx
jmp 0x42e1c2
mov dword [esp + 0x78], ecx
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], 0x410c94
mov dword [esp + 0x84], ecx
mov dword [esp + 0xa0], ebx
cmp dword [eax + 0x14], 8
jb 0x42e1d1
mov eax, dword [eax]
push 0x10000000
push 4
push ebx
push 3
push 0xc0000004
push eax
call fcn.0041f459
push eax
lea ecx, [esp + 0x78]
lea edi, [esp + 0x58]
call fcn.0042f5f2
lea esi, [esp + 0x74]
mov byte [esp + 0xa0], 2
call fcn.0042f635
cmp dword [esp + 0x54], 0xffffffff
jne 0x42e223
or dword [esp + 0xa0], 0xffffffff
lea eax, [esp + 0x54]
push eax
call fcn.00435efa
jmp 0x42e190
xor eax, eax
lea edi, [esp + 0x1c]
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
lea eax, [esp + 0x28]
push eax
push 2
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42e20c
xor eax, eax
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], ebx
mov word [esp + 0x38], ax
mov byte [esp + 0xa0], 3
cmp dword [esp + 0x24], eax
jne 0x42e27a
mov esi, 0xfeff
lea eax, [esp + 0x38]
call fcn.0042f5ba
jmp 0x42e33a
mov eax, 0xfeff
cmp word [esp + 0x14], ax
je 0x42e298
push 1
xor edi, edi
lea esi, [esp + 0x3c]
call fcn.0042081b
jmp 0x42e20c
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
lea edi, [esp + 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 2
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x38]
push dword [esp + 0x38]
push dword [esp + 0x64]
call esi
test eax, eax
je 0x42e286
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
push ebx
add ecx, 0xfffffffe
push ebx
adc eax, 0xffffffff
push eax
push ecx
push dword [esp + 0x64]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
call esi
test eax, eax
je 0x42e286
push ebx
lea eax, [esp + 0x28]
push eax
push 2
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42e3e9
mov eax, dword [esp + 0x24]
add dword [esp + 0x1c], eax
adc dword [esp + 0x20], ebx
cmp word [esp + 0x14], 0xa
je 0x42e33a
cmp word [esp + 0x14], 0xd
je 0x42e33a
mov eax, 0xfeff
cmp word [esp + 0x14], ax
je 0x42e33a
push 2
mov eax, 0x401760
lea ecx, [esp + 0x3c]
call fcn.004210b1
mov edi, dword [esp + 0x28]
cmp dword [edi + 0x10], 0
jbe 0x42e37e
cmp dword [edi + 0x14], 8
jb 0x42e34e
mov eax, dword [edi]
jmp 0x42e350
mov eax, edi
cmp word [eax], 0x23
jne 0x42e362
push 0x20
pop esi
lea eax, [esp + 0x38]
call fcn.0042f5ba
push ebx
push edi
or eax, 0xffffffff
lea esi, [esp + 0x40]
call fcn.0042058c
push 2
mov eax, 0x401760
mov ecx, esi
call fcn.004210b1
mov eax, dword [esp + 0x48]
push ebx
lea esi, [eax + eax]
push esi
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_LockFile]
cmp dword [esp + 0x4c], 8
mov eax, dword [esp + 0x38]
jae 0x42e3a8
lea eax, [esp + 0x38]
push ebx
lea ecx, [esp + 0x28]
push ecx
push esi
push eax
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne al
mov byte [esp + 0x1b], al
test al, al
je 0x42e3d1
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
push esi
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov bl, byte [esp + 0x1b]
push 1
xor edi, edi
lea esi, [esp + 0x3c]
call fcn.0042081b
or dword [esp + 0xa0], 0xffffffff
lea ecx, [esp + 0x54]
push ecx
call fcn.00435efa
mov al, bl
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.00484deb
mov esp, ebp
pop ebp
ret 8