Function at 0x42bd10
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 0x487a59
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x49600c]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x49600c]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
cmp dword [esi + 0x10], 0
jne 0x42bd5f
xor al, al
jmp 0x42bf8b
push 0x420110
lea ecx, [esp + 0x60]
call fcn.004222a0
xor ebx, ebx
mov dword [esp + 0x88], ebx
cmp dword [esi + 0x14], 8
jb 0x42bd7e
mov esi, dword [esi]
lea eax, [esp + 0x5c]
mov edx, 0xc0000004
push eax
push ecx
push 0x10000000
push 4
push ebx
push 3
mov ecx, esi
call fcn.0042032b
push eax
lea ecx, [esp + 0x44]
call fcn.00421f12
lea ecx, [esp + 0x5c]
mov byte [esp + 0x88], 2
call fcn.0041ae72
cmp dword [esp + 0x3c], 0xffffffff
je 0x42bf78
push ebx
lea eax, [esp + 0x20]
mov dword [esp + 0x18], ebx
push eax
push 2
pop esi
push esi
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], ebx
push eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42bf78
xor eax, eax
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], ax
mov byte [esp + 0x88], 3
cmp dword [esp + 0x1c], eax
jne 0x42be1d
push 0xfeff
lea ecx, [esp + 0x24]
call fcn.0042cfdf
jmp 0x42bec8
mov eax, 0xfeff
cmp word [esp + 0x10], ax
jne 0x42bf6b
push esi
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x42bf6b
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ecx, 0xfffffffe
push ebx
push ebx
adc eax, 0xffffffff
mov dword [esp + 0x1c], ecx
push eax
push ecx
push dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x42bf6b
push ebx
lea eax, [esp + 0x20]
push eax
push esi
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42bf6b
mov eax, dword [esp + 0x1c]
add dword [esp + 0x14], eax
adc dword [esp + 0x18], ebx
cmp word [esp + 0x10], 0xa
je 0x42bec8
cmp word [esp + 0x10], 0xd
je 0x42bec8
mov eax, 0xfeff
cmp word [esp + 0x10], ax
je 0x42bec8
push esi
push 0x40744c
lea ecx, [esp + 0x28]
call fcn.00426ef1
cmp dword [edi + 0x10], 0
jbe 0x42bf07
cmp dword [edi + 0x14], 8
jb 0x42bed8
mov eax, dword [edi]
jmp 0x42beda
mov eax, edi
cmp word [eax], 0x23
jne 0x42beeb
push 0x20
lea ecx, [esp + 0x24]
call fcn.0042cfdf
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esp + 0x2c]
call fcn.0041b495
push esi
push 0x40744c
lea ecx, [esp + 0x28]
call fcn.00426ef1
mov eax, dword [esp + 0x30]
push ebx
lea esi, [eax + eax]
push esi
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_LockFile]
cmp dword [esp + 0x34], 8
mov eax, dword [esp + 0x20]
jae 0x42bf31
lea eax, [esp + 0x20]
push ebx
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne bl
test bl, bl
je 0x42bf56
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push esi
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
push 0
push 1
lea ecx, [esp + 0x28]
call fcn.0041b746
or dword [esp + 0x88], 0xffffffff
lea ecx, [esp + 0x3c]
call fcn.00421f5b
mov al, bl
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.00484070
mov esp, ebp
pop ebp
ret 8