Function at 0x42f6aa
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x4681a1
call fcn.0043540c
sub esp, 0xf4
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0x38], ebx
call fcn.0042f402
mov eax, dword [ebp + 8]
mov dword [ebp - 4], ebx
cmp word [eax + 0x118], bx
setne byte [ebp - 0xe]
cmp dword [esi + 0x210], ebx
je 0x42fac0
cmp eax, ebx
je 0x42fac0
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push 0x80
push 3
push ebx
push 3
lea eax, [esi + 4]
push SysReAllocString
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x2c], eax
jne 0x42f729
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x21c], eax
jmp 0x42fac0
push ebx
push ebx
push dword [ebp + 0xc]
mov ecx, esi
push eax
call fcn.0042fcca
test eax, eax
je 0x42fac0
cmp byte [ebp - 0xe], bl
je 0x42f754
mov eax, dword [ebp - 0xd0]
cmp eax, ebx
jne 0x42f757
mov eax, 0x46b5e8
jmp 0x42f757
mov eax, dword [ebp + 0x10]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
jne 0x42f78b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x2c]
mov dword [esi + 0x21c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42fac0
mov edi, dword [ebp + 8]
mov eax, 0x400
mov dword [ebp - 0x24], eax
mov esi, dword [edi + 0x10c]
cmp esi, eax
mov dword [ebp - 0x18], esi
jae 0x42f7a6
mov dword [ebp - 0x24], esi
push dword [ebp - 0x24]
call fcn.00435520
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x104]
test al, 6
pop ecx
mov byte [ebp + 0xf], bl
je 0x42f7c3
mov byte [ebp + 0xf], 1
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x1c], 1
shr al, 2
and al, 1
cmp edi, ebx
mov byte [ebp - 0xd], al
je 0x42f7e9
mov eax, dword [edi]
push esi
push ebx
mov ecx, edi
call dword [eax]
cmp al, bl
jne 0x42f87d
lea eax, [ebp - 0x14]
push ebx
push eax
mov dword [ebp - 0x34], esi
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x30], ebx
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call esi
test eax, eax
je 0x42f880
cmp byte [ebp - 0xd], bl
je 0x42f824
cmp byte [ebp + 0xf], bl
je 0x42f824
push dword [ebp + 8]
push dword [ebp - 0x14]
push dword [ebp - 0x28]
call fcn.00401812
add esp, 0xc
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x28]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x30], eax
cmp edi, ebx
je 0x42f852
push dword [ebp - 0x34]
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0x30]
call dword [eax]
cmp al, bl
jne 0x42f87d
mov eax, dword [ebp - 0x14]
sub dword [ebp - 0x18], eax
je 0x42f880
cmp eax, ebx
je 0x42f880
cmp dword [ebp - 0x18], 0x400
jae 0x42f86d
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
push ebx
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
jmp 0x42f803
mov dword [ebp - 0x1c], ebx
push dword [ebp - 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x20]
call esi
cmp dword [ebp - 0x1c], ebx
je 0x42f926
cmp byte [ebp - 0xd], bl
jne 0x42f926
cmp byte [ebp + 0xf], bl
je 0x42f926
cmp byte [ebp - 0xe], bl
je 0x42f8c2
mov eax, dword [ebp - 0xd0]
cmp eax, ebx
jne 0x42f907
mov eax, 0x46b5e8
jmp 0x42f907
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x88], 0x46b57c
cmp eax, ebx
mov dword [ebp - 0x68], 0x46b574
jne 0x42f8df
mov eax, 0x486618
lea ecx, [ebp + 0xf]
push ebx
push ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.004010c6
mov dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x80]
mov byte [ebp - 4], 1
cmp eax, ebx
jne 0x42f907
mov eax, 0x46b598
push dword [ebp + 8]
push eax
call fcn.00401870
test byte [ebp - 0x38], 1
pop ecx
mov dword [ebp - 4], ebx
pop ecx
je 0x42f926
lea ecx, [ebp - 0x88]
call fcn.00401306
cmp byte [ebp - 0xe], bl
je 0x42fab4
cmp edi, ebx
mov esi, 0x46b5b8
je 0x42fa37
mov eax, dword [ebp - 0x18]
push 1
shr eax, 0xe
mov dword [ebp - 0x34], eax
lea eax, [ebp + 0xf]
push eax
lea ecx, [ebp - 0x60]
push dword [ebp + 8]
call fcn.00402c90
mov eax, dword [ebp + 0x10]
mov byte [ebp - 4], 2
cmp eax, ebx
mov dword [ebp - 0x88], 0x46b5c0
mov dword [ebp - 0x68], esi
jne 0x42f973
mov eax, 0x486618
lea ecx, [ebp - 0xd]
push ebx
push ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.00403d1a
lea eax, [ebp - 0xb0]
push ebx
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 3
call fcn.00402517
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 5
call fcn.00402079
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x100]
push 0x47fe84
push eax
call fcn.004223b9
add esp, 0xc
push eax
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 6
call fcn.00413aec
lea ecx, [ebp - 0x100]
mov byte [ebp + 0xb], al
mov byte [ebp - 4], 5
call fcn.00402079
cmp byte [ebp + 0xb], bl
je 0x42f9f8
lea eax, [ebp - 0xb0]
lea ecx, [ebp - 0x60]
push eax
call fcn.004020f3
mov edi, dword [edi]
lea ecx, [ebp - 0x60]
call fcn.0040903e
mov dword [ebp + 8], edi
mov edi, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 8]
push 1
mov ecx, edi
call dword [eax + 4]
push dword [ebp - 0x34]
mov eax, dword [edi]
mov ecx, edi
push ebx
call dword [eax]
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 2
call fcn.00402079
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], bl
call fcn.00402079
or dword [ebp - 0x20], 0xffffffff
mov eax, dword [ebp + 0x10]
mov byte [ebp - 4], 7
cmp eax, ebx
mov dword [ebp - 0x60], 0x46b5c0
mov dword [ebp - 0x40], esi
jne 0x42fa55
mov eax, 0x486618
lea ecx, [ebp + 0xb]
push ebx
push ecx
push eax
lea ecx, [ebp - 0x60]
call fcn.00403d1a
lea eax, [ebp - 0xb0]
lea ecx, [ebp - 0xd8]
push eax
mov byte [ebp - 4], 8
call fcn.0042f503
lea eax, [ebp - 0x60]
push edi
push eax
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 9
call fcn.0045c8d0
neg eax
sbb eax, eax
lea ecx, [ebp - 0xb0]
inc eax
mov byte [ebp - 4], 8
mov dword [ebp - 0x1c], eax
call fcn.00402079
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 7
call fcn.00402079
push dword [ebp - 0x28]
call fcn.004347fc
mov ebx, dword [ebp - 0x1c]
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xd8]
call fcn.0042f4e4
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10