Function at 0x10022020
Capabilities:
Delete file
Get file size

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10058b51
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x10074068]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], edi
mov esi, dword [ebx + 8]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], 0
mov dword [edi], vtable.Logger.0
mov dword [edi + 4], 0xffffffff
lea ecx, [edi + 8]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov byte [ebp - 4], 2
push 0x18
mov dword [edi + 0x14], 0x200000
call fcn.10037117
add esp, 4
xorps xmm0, xmm0
movups xmmword [eax], xmm0
push eax
movq qword [eax + 0x10], xmm0
mov dword [edi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push ecx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x34]
mov eax, dword [esi + 0x10]
push ecx
add eax, 0x400
mov dword [ebp - 0x34], 0
push eax
lea ecx, [ebp - 0x48]
call fcn.1000cb20
mov byte [ebp - 4], 4
xor edx, edx
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x34], edx
mov ecx, esi
test edx, edx
je 0x10022119
cmp dword [esi + 0x14], 8
jb 0x100220ff
mov ecx, dword [esi]
mov eax, dword [ebp - 0x44]
push edx
push ecx
sub eax, edi
sar eax, 1
push str._s__d.log
push eax
push edi
call fcn.10022ad0
add esp, 0x14
jmp 0x10022138
cmp dword [esi + 0x14], 8
jb 0x10022121
mov ecx, dword [esi]
mov eax, dword [ebp - 0x44]
push ecx
sub eax, edi
sar eax, 1
push str._s.log
push eax
push edi
call fcn.10022ad0
add esp, 0x10
test eax, eax
js 0x10022255
xor eax, eax
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
mov eax, edi
mov dword [ebp - 0x18], 7
lea edx, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10022160
sub eax, edx
lea ecx, [ebp - 0x2c]
sar eax, 1
push eax
push edi
call fcn.1000b7d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
push ecx
mov eax, dword [esi + 0xc]
cmp dword [esi + 0x10], eax
je 0x10022199
mov ecx, eax
call fcn.100041b0
add dword [esi + 0xc], 0x18
jmp 0x100221a2
push eax
lea ecx, [esi + 8]
call fcn.1000cc50
mov dword [ebp - 0x38], 0xffffffff
push ecx
push 3
mov byte [ebp - 4], 6
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x38]
push SysReAllocString
push eax
call fcn.10022830
mov esi, dword [ebp - 0x38]
cmp esi, 0xffffffff
je 0x10022214
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x14], 0
je 0x1002220d
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x14]
add eax, eax
cmp ecx, eax
jbe 0x1002220d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10022214
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x10022252
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10022248
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100222e5
push edx
push ecx
call fcn.10036da6
add esp, 8
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x34]
inc edx
mov dword [ebp - 0x34], edx
cmp edx, 2
jne 0x100220f1
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0xc]
mov esi, dword [eax + 8]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x10022290
push esi
mov esi, dword [ebp - 0x30]
mov ecx, esi
call fcn.10021f20
jmp 0x10022293
mov esi, dword [ebp - 0x30]
test edi, edi
je 0x100222c3
mov ecx, dword [ebp - 0x40]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100222b9
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100222e5
push ecx
push edi
call fcn.10036da6
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10036d72
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
call fcn.1003be19
int3