Function at 0x10022320
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10128708
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x10194008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0x18], 0
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x6c], ebx
je 0x10022360
push 0
call fcn.10022860
mov ecx, dword [edi + 0x9c]
test ecx, ecx
je 0x10022374
mov eax, dword [ecx]
push dword [edi + 0xa0]
call dword [eax]
lea eax, [edi + 4]
mov dword [ebp - 0x30], 0
push eax
lea ecx, [ebp - 0x30]
call fcn.1000b9f0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x60]
push eax
mov ecx, edi
call fcn.10022c00
mov byte [ebp - 4], 1
lea eax, [ebp - 0x48]
push eax
mov ecx, edi
call fcn.10022d10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x60]
call fcn.100055f0
test al, al
jne 0x100227aa
lea ecx, [ebp - 0x48]
call fcn.100055f0
test al, al
jne 0x100227aa
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x48]
call fcn.100065d0
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
call esi
mov dword [edi + 0x18], eax
cmp eax, 0xffffffff
je 0x100227a1
test eax, eax
je 0x100227a1
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x60]
call fcn.100065d0
push eax
call esi
mov esi, eax
mov dword [ebp - 0x68], esi
cmp esi, 0xffffffff
je 0x10022780
test esi, esi
je 0x10022780
lea ecx, [ebp - 0x30]
call fcn.1000ba70
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x28], eax
cmp eax, 0x1400000
jbe 0x100224b6
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
lea eax, [edi + 4]
mov dword [ebp - 0x18], 0
push eax
lea ecx, [ebp - 0x18]
call fcn.1000b9f0
mov byte [ebp - 4], 3
mov eax, dword [edi + 0x18]
test eax, eax
je 0x10022482
push eax
call esi
mov dword [edi + 0x18], 0
lea ecx, [ebp - 0x60]
call fcn.100065d0
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
lea ecx, [ebp - 0x48]
call fcn.100065d0
push eax
call esi
mov dword [edi + 0x1c], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x18]
call fcn.1000ba20
jmp 0x10022803
mov byte [ebp - 0x61], 1
mov byte [ebp - 0x18], 0
test eax, eax
je 0x1002264a
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x62]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x62], 0
call fcn.10023020
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10022527
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x28]
je 0x1002259d
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
mov byte [ebp - 4], 5
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x24]
call fcn.10022fe0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x10022599
mov edx, dword [ebp - 0x70]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x1002257a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022848
push edx
push ecx
call fcn.100fc94e
add esp, 8
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x61], 0
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x20]
je 0x100225f3
mov ecx, ebx
call fcn.10022e90
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], 0
sub eax, dword [ebp - 0x24]
je 0x100225de
nop dword [eax + eax]
push ebx
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x24]
call fcn.1002eec0
add esp, 4
test al, al
je 0x100225de
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x24]
cmp dword [ebp - 0x14], eax
jb 0x100225c0
mov eax, dword [ebp - 0x18]
mov ecx, 1
cmp dword [ebx + 4], 0
movzx eax, al
cmove eax, ecx
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x10022640
mov edx, dword [ebp - 0x1c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10022621
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002284d
push edx
push ecx
call fcn.100fc94e
add esp, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp byte [ebp - 0x61], 0
je 0x1002272d
lea eax, [edi + 4]
mov dword [ebp - 0x14], 0
push eax
lea ecx, [ebp - 0x14]
call fcn.1000b9f0
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x28]
push 0
push 0
push 0
push dword [edi + 0x18]
mov dword [edi + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push eax
push 4
lea eax, [ebp - 0x28]
push eax
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
neg ebx
sbb bl, bl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.1000ba20
and bl, byte [ebp - 0x61]
je 0x1002272d
lea ecx, [edi + 0x10]
call fcn.10022e90
cmp dword [edi + 0xc], 0
je 0x100226de
mov eax, dword [edi + 8]
lea esi, [edi + 8]
mov ecx, dword [ebp - 0x6c]
push eax
push dword [eax]
lea eax, [ebp - 0x6c]
push dword [ecx]
push eax
call fcn.100231f0
push esi
lea ecx, [edi + 0x10]
call fcn.10022e50
mov esi, dword [ebp - 0x68]
lea ebx, [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x18], 0
je 0x10022803
lea ecx, [ebp - 0x60]
call fcn.100065d0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
call fcn.1000b9f0
mov byte [ebp - 4], 8
mov dword [edi + 0x1c], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.1000ba20
jmp 0x10022803
lea ebx, [edi + 4]
mov dword [ebp - 0x14], 0
push ebx
lea ecx, [ebp - 0x14]
call fcn.1000b9f0
mov byte [ebp - 4], 7
mov eax, dword [edi + 0x18]
test eax, eax
je 0x10022759
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x18], 0
lea ecx, [ebp - 0x48]
call fcn.100065d0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [edi + 0x1c], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.1000ba20
jmp 0x100226e1
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x48]
mov dword [edi + 0x18], 0
call fcn.100065d0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10022803
mov dword [edi + 0x18], 0
jmp 0x10022803
lea esi, [edi + 0x10]
mov ecx, esi
call fcn.10022e90
cmp dword [edi + 0xc], 0
je 0x10022803
mov eax, dword [edi + 8]
mov ecx, ebx
push eax
push dword [eax]
lea eax, [ebp - 0x68]
push dword [ebx]
push eax
call fcn.100231f0
lea edx, [edi + 8]
cmp esi, edx
je 0x10022803
mov ecx, dword [esi]
mov eax, dword [edx]
mov dword [esi], eax
mov dword [edx], ecx
lea ecx, [edi + 0x14]
call fcn.10004ba0
lea ecx, [edx + 4]
mov eax, dword [eax]
mov dword [ebp - 0x68], eax
call fcn.10004ba0
lea ecx, [ebp - 0x68]
mov eax, dword [eax]
mov dword [edi + 0x14], eax
call fcn.10004ba0
mov eax, dword [eax]
mov dword [edx + 4], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
call fcn.10004ab0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x60]
call fcn.10004ab0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.1000ba20
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100fc499
mov esp, ebp
pop ebp
ret 4
call fcn.10100e04
call fcn.10100e04
int3