Function at 0x100218b0
Capabilities:
Check if file exists
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003c07d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x10059024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x44]
mov ecx, dword [ebp + 8]
mov edx, str.CustomActionData
push eax
call fcn.10010bc0
mov eax, dword [ebp - 0x40]
add esp, 4
movzx ebx, word [eax]
lea edi, [eax + 2]
movzx eax, word [edi]
mov dword [ebp - 0x24], ebx
mov dword [ebp + 8], edi
test ax, ax
jne 0x1002191c
xor edx, edx
jmp 0x10021942
mov ecx, edi
mov edx, eax
cmp dx, bx
je 0x10021935
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x10021920
xor ecx, ecx
mov edx, edi
xor eax, eax
lea edi, [ecx + 2]
mov word [ecx], ax
mov dword [ebp + 8], edi
xor ecx, ecx
mov dword [ebp - 0x20], edx
mov eax, edx
mov dword [ebp - 0x1c], ecx
cmp word [edx], cx
je 0x1002195e
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x10021951
mov dword [ebp - 0x1c], ecx
movzx eax, word [edi]
test ax, ax
jne 0x10021983
push 0xa
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0xffffffff
xor ecx, ecx
call fcn.1000fd60
add esp, 4
mov dword [ebp - 0x14], eax
xor esi, esi
jmp 0x100219f1
mov edx, edi
mov ecx, eax
cmp cx, bx
je 0x1002199c
movzx eax, word [edx + 2]
add edx, 2
mov ecx, eax
test ax, ax
jne 0x10021987
xor edx, edx
xor eax, eax
mov dword [ebp - 0x10], 0xffffffff
mov word [edx], ax
mov ecx, edi
movzx esi, word [edx + 2]
lea edi, [edx + 2]
push 0xa
lea edx, [ebp - 0x10]
mov dword [ebp + 8], edi
call fcn.1000fd60
add esp, 4
mov dword [ebp - 0x14], eax
test si, si
jne 0x100219cd
xor esi, esi
jmp 0x100219f1
mov ecx, esi
mov esi, edi
cmp cx, bx
je 0x100219e6
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x100219d1
xor edi, edi
xor eax, eax
mov word [edi], ax
add edi, 2
mov dword [ebp + 8], edi
push 0xa
lea edx, [ebp - 0x28]
mov dword [ebp - 0x28], 0xffffffff
mov ecx, esi
call fcn.1000fd60
add esp, 4
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov byte [ebp - 4], 1
push 0x19000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, eax
movzx eax, word [edi]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], 0x19000
test ax, ax
je 0x10021c49
mov esi, dword [ebp - 0x24]
mov ecx, edi
mov edx, eax
nop
cmp dx, si
je 0x10021a65
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x10021a50
xor ecx, ecx
xor eax, eax
mov word [ecx], ax
add ecx, 2
mov dword [ebp - 0x28], ecx
test edi, edi
je 0x10021c43
lea edx, [eax + 2]
nop dword [eax + eax]
xor esi, esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
mov byte [ebp - 4], 2
mov eax, ecx
sub eax, edi
xor ecx, ecx
mov edi, dword [ebp - 0x1c]
sar eax, 1
add edi, 3
add edi, eax
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x38], eax
mov ecx, eax
mov dword [ebp - 0x3c], edi
cmp word [eax], si
je 0x10021ac9
nop dword [eax]
add ecx, 2
cmp word [ecx], 0
jne 0x10021ac0
mov edi, dword [ebp + 8]
mov edx, edi
push 0xffffffffffffffff
call fcn.10007d70
mov ecx, dword [ebp - 0x14]
add esp, 4
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x20]
xor ecx, ecx
mov word [eax], cx
mov ecx, eax
push 0xffffffffffffffff
call fcn.10007d70
mov ecx, dword [ebp - 0x10]
add esp, 4
mov edx, eax
call fcn.1000e080
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
jne 0x10021b5c
push dword [ebp - 0x38]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x10021bdf
push 0
push 0x80
push 3
push 0
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10021b3c
xor esi, esi
jmp 0x10021b5c
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push dword [ebp - 0x2c]
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 2
push 0
push 0
push esi
call edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10021bdf
push 0
lea eax, [ebp - 0x18]
push eax
push 0x19000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10021bc1
push 0
lea ecx, [ebp - 0x34]
push ecx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x18]
push eax
push 0x19000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x10021b98
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x30]
jmp 0x10021ae1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
push dword [ebp - 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
movzx eax, word [edi]
test ax, ax
je 0x10021c49
mov ecx, edi
mov edx, eax
cmp dx, word [ebp - 0x24]
je 0x10021c28
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x10021c12
xor ecx, ecx
xor eax, eax
mov dword [ebp + 8], edi
mov word [ecx], ax
add ecx, 2
mov dword [ebp - 0x28], ecx
lea edx, [eax + 2]
test edi, edi
jne 0x10021a80
jmp 0x10021c49
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], 0
test ebx, ebx
je 0x10021c54
push ebx
call esi
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x40]
call esi
mov dword [ebp - 0x40], 0
xor eax, eax
mov dword [ebp - 0x44], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4