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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101287b1
mov eax, dword fs:[0]
push eax
sub esp, 0x40
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
mov bl, byte [ebp + 8]
mov dword [ebp - 0x4c], 0
test bl, bl
je 0x100228b0
mov ecx, dword [edi + 0x9c]
test ecx, ecx
je 0x100228b0
mov eax, dword [ecx]
push dword [edi + 0xa0]
call dword [eax + 4]
lea eax, [edi + 4]
mov dword [ebp - 0x2c], 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000b9f0
mov dword [ebp - 4], 0
test bl, bl
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
je 0x10022b27
push 0
push 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.10023130
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 3
lea edx, [edi + 0x10]
lea eax, [ebp - 0x18]
cmp edx, eax
je 0x10022931
mov ecx, dword [edx]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], ecx
lea ecx, [edx + 4]
mov dword [edx], eax
call fcn.10004ba0
lea ecx, [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
call fcn.10004ba0
lea ecx, [ebp - 0x1c]
mov eax, dword [eax]
mov dword [edx + 4], eax
call fcn.10004ba0
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x18]
call fcn.10022e90
mov byte [ebp - 4], 0
push 0x54
push dword [ebp - 0x18]
call fcn.100fc94e
add esp, 8
mov byte [ebp - 4], 6
lea eax, [edi + 0x20]
push eax
lea ecx, [ebp - 0x44]
call fcn.10004ac0
cmp dword [edi + 0x1c], 0
mov dword [ebp - 0x4c], 1
jbe 0x10022b0b
lea ecx, [ebp - 0x44]
call fcn.100055f0
test al, al
jne 0x10022b0b
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x44]
call fcn.100065d0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10022b0b
test esi, esi
je 0x10022b0b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [edi + 0x1c]
mov ebx, eax
mov edx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebx, ecx
sete al
mov byte [ebp - 0x45], al
jbe 0x10022ad1
push 0
push 0
push ecx
push esi
call edx
sub ebx, dword [edi + 0x1c]
xorps xmm0, xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov byte [ebp - 4], 7
lea eax, [ebp - 0x46]
push eax
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x46], 0
call fcn.10023020
push 0
lea eax, [ebp - 0x14]
push eax
push ebx
push dword [ebp - 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10022aa2
cmp dword [ebp - 0x14], ebx
jne 0x10022aa2
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push ebx
push dword [ebp - 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10022aa2
cmp dword [ebp - 0x1c], ebx
jne 0x10022a6f
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov al, byte [ebp - 0x45]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x10022acb
mov edx, dword [ebp - 0x20]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10022aa9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022bf7
jmp 0x10022aa9
mov al, 1
mov byte [ebp - 0x45], al
jmp 0x10022a72
push edx
push ecx
call fcn.100fc94e
mov al, byte [ebp - 0x45]
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov edx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
test al, al
je 0x10022ae5
push 0
push 0
push 0
push esi
call edx
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x45], 0
je 0x10022b05
lea ecx, [ebp - 0x44]
call fcn.100065d0
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call ebx
jmp 0x10022b0b
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 1
mov dword [ebp - 0x4c], eax
and eax, 0xfffffffe
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.10004ab0
jmp 0x10022b88
cmp dword [edi + 0x14], 0
je 0x10022b88
mov eax, dword [edi + 0x10]
lea ecx, [edi + 8]
push eax
push dword [eax]
lea eax, [ebp - 0x1c]
push dword [ecx]
push eax
call fcn.100231f0
push 0
push 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.10023130
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 0x10]
call fcn.10022e50
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x18]
call fcn.10022e90
mov byte [ebp - 4], 0
push 0x54
push dword [ebp - 0x18]
call fcn.100fc94e
add esp, 8
mov eax, dword [edi + 0x18]
test eax, eax
je 0x10022bc3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x44]
mov dword [edi + 0x18], 0
push eax
mov ecx, edi
call fcn.10022d10
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x44]
call fcn.100065d0
push eax
call ebx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.10004ab0
mov dword [edi + 0x1c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
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
int3