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

Disassembly:
mov eax, 0x4680ff
call fcn.0043540c
sub esp, 0x98
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 0x210], ebx
je 0x42f056
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0xc]
call fcn.0042f5b6
test eax, eax
je 0x42f05d
mov dword [esi + 0x21c], 0xffffff9c
xor eax, eax
jmp 0x42f3f0
mov edi, 0x138
push edi
call fcn.00435520
push edi
push ebx
push eax
mov dword [ebp - 0x10], eax
call fcn.00435d50
add esp, 0x10
lea ecx, [ebp - 0x54]
call fcn.0042f402
cmp byte [esi + 0x216], bl
mov dword [ebp - 4], ebx
je 0x42f129
mov eax, dword [esi + 0x220]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x54]
push eax
mov byte [ebp - 4], 1
call fcn.0042f503
lea eax, [ebp - 0x11]
push 1
push eax
lea ecx, [ebp - 0xa4]
push dword [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00402c90
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xa4]
push eax
mov byte [ebp - 4], 3
call fcn.0045c560
lea ecx, [ebp - 0xa4]
mov edi, eax
mov byte [ebp - 4], 2
call fcn.00402079
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 1
call fcn.00402079
cmp edi, ebx
je 0x42f118
push dword [ebp - 0x10]
call fcn.004347fc
or dword [ebp - 4], 0xffffffff
pop ecx
lea ecx, [ebp - 0x54]
mov dword [esi + 0x21c], edi
call fcn.0042f4e4
mov eax, edi
jmp 0x42f3f0
mov edi, dword [ebp - 0x10]
mov byte [ebp - 4], bl
mov word [edi + 0x118], 1
jmp 0x42f185
mov edi, dword [ebp - 0x4c]
cmp edi, ebx
jne 0x42f135
mov edi, 0x46b5e8
lea eax, [ebp - 0x11]
push 1
push eax
lea ecx, [ebp - 0x7c]
push dword [ebp + 8]
call fcn.00402c90
mov eax, dword [eax + 8]
cmp eax, ebx
jne 0x42f152
mov eax, 0x46b5e8
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
neg eax
sbb al, al
lea ecx, [ebp - 0x7c]
inc al
mov byte [ebp + 0xb], al
call fcn.00402079
cmp byte [ebp + 0xb], bl
je 0x42f182
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x21c], eax
jmp 0x42f2ae
mov edi, dword [ebp - 0x10]
cmp byte [esi + 0x214], bl
je 0x42f212
cmp byte [esi + 0x215], bl
mov byte [ebp + 0xb], 1
jne 0x42f1e6
lea eax, [ebp - 0x11]
push 1
push eax
lea ecx, [ebp - 0x7c]
push dword [ebp + 0xc]
call fcn.00401a72
mov edx, dword [ebp - 0x4c]
mov byte [ebp - 4], 4
cmp edx, ebx
mov dword [ebp + 8], 0x46b5e8
je 0x42f1c3
mov dword [ebp + 8], edx
mov ecx, eax
call fcn.00401c63
push eax
push dword [ebp + 8]
call fcn.00401720
pop ecx
mov byte [ebp - 4], bl
pop ecx
test eax, eax
lea ecx, [ebp - 0x7c]
setne byte [ebp + 0xb]
call fcn.00401306
cmp byte [ebp + 0xb], bl
mov cl, byte [esi + 0x215]
je 0x42f20b
or dword [edi + 0x104], 2
lea eax, [edi + 0x104]
cmp cl, bl
mov edi, dword [eax]
je 0x42f212
or edi, 4
mov dword [eax], edi
jmp 0x42f212
or dword [edi + 0x104], 0xffffffff
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
jne 0x42f21e
mov eax, 0x46b5e8
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocString
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
je 0x42f171
push ebx
push 0x80
push 3
push ebx
push 3
lea eax, [esi + 4]
push 0x40000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x42f277
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x24]
mov dword [esi + 0x21c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42f2ae
push dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0x10]
call edi
push ebx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x10]
push ebx
push ebx
mov dword [ecx + 0x10c], eax
push dword [esi + 0x218]
mov ecx, esi
push dword [ebp + 8]
call fcn.0042fcca
test eax, eax
jne 0x42f2bc
push dword [ebp - 0x10]
call fcn.004347fc
pop ecx
jmp 0x42f3e2
push dword [0x480e40]
push dword [esi + 0x224]
call edi
mov eax, dword [esi + 0x230]
mov ecx, dword [esi + 0x224]
inc eax
push ebx
mov word [ecx + 0xe], ax
lea eax, [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push 0x2e
push dword [esi + 0x224]
push dword [ebp + 8]
call edi
push 2
push ebx
push ebx
mov ecx, esi
push dword [ebp + 8]
call fcn.0042fcca
test eax, eax
je 0x42f3e2
lea eax, [ebp - 0x18]
push ebx
push eax
push 0x138
push dword [ebp - 0x10]
push dword [ebp + 8]
call edi
cmp dword [ebp - 0x18], ebx
je 0x42f2ae
push 0x400
call fcn.00435520
pop ecx
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x1c], ebx
cmp ecx, ebx
je 0x42f346
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx]
push dword [edx + 0x10c]
push ebx
call dword [eax]
lea eax, [ebp - 0x18]
push ebx
push eax
push 0x400
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42f3b8
cmp dword [ebp - 0x18], ebx
je 0x42f3b8
cmp byte [esi + 0x215], bl
je 0x42f386
cmp byte [esi + 0x214], bl
je 0x42f386
push dword [ebp + 0xc]
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call fcn.004016c2
add esp, 0xc
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x10]
add dword [ebp - 0x1c], eax
cmp ecx, ebx
je 0x42f3b3
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx]
push dword [edx + 0x10c]
push dword [ebp - 0x1c]
call dword [eax]
cmp dword [ebp - 0x18], ebx
jne 0x42f346
push dword [ebp - 0x10]
lea ecx, [esi + 0x228]
call fcn.0042ff81
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 8]
call esi
push dword [ebp - 0x20]
call fcn.004347fc
pop ecx
push 1
pop ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.0042f4e4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc