Function at 0x4217f8
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ecx
mov ebx, edx
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x421baf
push dword fs:[eax]
mov dword fs:[eax], esp
lea ecx, [ebp - 0x5a]
mov edx, ebx
mov eax, dword [ebp - 0x10]
call fcn.0042178c
test al, al
je 0x421b7f
mov byte [ebp - 0x11], 1
lea eax, [ebp - 0x60]
lea edx, [ebp - 0x56]
call fcn.00407728
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 4]
lea eax, [ebp - 4]
call fcn.00407898
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 4]
lea eax, [ebp - 8]
mov ecx, 0x421bc8
call fcn.00407898
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
call fcn.00421d2c
test al, al
je 0x4218b4
mov eax, dword [ebp - 0x10]
cmp word [eax + 0x32], 0
je 0x4218b4
lea eax, [ebp - 0x11]
push eax
lea ecx, [ebp - 0x5a]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
call fcn.00421d7c
mov ecx, eax
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x34]
call dword [ebx + 0x30]
cmp byte [ebp - 0x11], 0
je 0x421a1f
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
call fcn.0042166c
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4218f6
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 4]
mov edx, 0x421bec
call fcn.00407898
mov ecx, dword [ebp - 0x64]
mov dl, 1
mov eax, dword [0x40b960]
call fcn.0040cae0
call fcn.00405c4c
xor eax, eax
push ebp
push 0x421a18
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.00407450
push eax
call sub.kernel32.dll_DeleteFileW
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x1c]
call fcn.0040e750
mov eax, dword [ebp - 0x30]
call fcn.0040452c
mov dword [ebp - 0x28], eax
xor eax, eax
push ebp
push 0x4219fa
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x28]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov ebx, dword [ebp - 0x28]
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x28]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x24]
xor edx, edx
cmp edx, dword [ebp - 0x2c]
jne 0x421971
cmp eax, dword [ebp - 0x30]
je 0x4219a4
lea eax, [ebp - 0x6c]
lea edx, [ebp - 0x56]
call fcn.00407728
mov ecx, dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
mov edx, 0x421c3c
call fcn.00407898
mov ecx, dword [ebp - 0x68]
mov dl, 1
mov eax, dword [0x40b960]
call fcn.0040cae0
call fcn.00405c4c
jmp 0x4219e4
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
push eax
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x24]
je 0x4219e4
lea eax, [ebp - 0x70]
mov ecx, dword [ebp - 4]
mov edx, 0x421ca4
call fcn.00407898
mov ecx, dword [ebp - 0x70]
mov dl, 1
mov eax, dword [0x40b960]
call fcn.0040cae0
call fcn.00405c4c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x421a01
mov eax, dword [ebp - 0x28]
call fcn.00404548
ret
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.0042166c
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
mov ecx, 0
call fcn.00407608
cmp dword [ebp - 0x20], 0
jne 0x421a67
lea eax, [ebp - 0x74]
mov ecx, dword [ebp - 8]
mov edx, 0x421cf8
call fcn.00407898
mov ecx, dword [ebp - 0x74]
mov dl, 1
mov eax, dword [0x40b960]
call fcn.0040cae0
call fcn.00405c4c
xor edx, edx
push ebp
push 0x421b78
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
test eax, eax
je 0x421a92
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x421a92
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00406608
test eax, eax
je 0x421a9b
sub eax, 4
mov eax, dword [eax]
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
add eax, eax
add eax, eax
call fcn.0040452c
mov dword [ebp - 0x28], eax
xor edx, edx
push ebp
push 0x421b5a
push dword fs:[edx]
mov dword fs:[edx], esp
mov esi, dword [ebp - 0x24]
sub esi, 2
test esi, esi
jl 0x421af6
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x421ae8
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x421ae8
lea eax, [ebp - 0xc]
xor ecx, ecx
mov edx, dword [ebp - 0xc]
call fcn.00406638
movzx eax, byte [eax + ebx]
mov edx, dword [ebp - 0x28]
mov byte [edx + ebx], al
inc ebx
dec esi
jne 0x421ac9
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov byte [eax + edx - 1], 0
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x24]
je 0x421b44
lea eax, [ebp - 0x78]
mov ecx, dword [ebp - 8]
mov edx, 0x421ca4
call fcn.00407898
mov ecx, dword [ebp - 0x78]
mov dl, 1
mov eax, dword [0x40b960]
call fcn.0040cae0
call fcn.00405c4c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x421b61
mov eax, dword [ebp - 0x28]
call fcn.00404548
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x421bb6
lea eax, [ebp - 0x78]
mov edx, 7
call fcn.004073bc
lea eax, [ebp - 0xc]
call fcn.00406458
lea eax, [ebp - 8]
mov edx, 2
call fcn.004073bc
ret