Function at 0x100365f2
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
push ebx
push esi
push edi
xor edx, edx
cmp dword [ebp + 0x28], 2
push 0x20
pop eax
push 0x18
pop ecx
cmove eax, ecx
mov dword [ebp - 4], edx
mov ecx, dword [ebp + 8]
mov edi, edx
mov dword [ebp - 0xc], edi
mov ebx, edx
mov dword [ebp - 0x10], ebx
mov esi, edx
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x10036640
push 0x101a5668
push ecx
call fcn.10172107
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0xc], edi
jmp 0x10036663
shr eax, 3
imul eax, dword [ebp + 0x10]
imul eax, dword [ebp + 0x14]
add eax, 0x8000
push eax
push edx
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test edi, edi
jne 0x1003666f
test ebx, ebx
je 0x10036912
xor ebx, ebx
push ebx
push ebx
push ebx
push str.1.6.37
call fcn.100cddb0
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x100368c3
push 0x40
push fcn.101929bb
push eax
call fcn.100c8260
push ebx
push eax
call fcn.101929d0
add esp, 0x14
test eax, eax
je 0x100366f4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.100cde70
pop ecx
pop ecx
cmp dword [ebp - 0x14], ebx
je 0x100366c4
push dword [ebp - 0x14]
call fcn.1004b1f3
pop ecx
cmp dword [ebp - 0xc], ebx
je 0x100366dd
push dword [ebp - 0xc]
call fcn.100232fb
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x100366ed
push dword [ebp - 0x10]
push ebx
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x10036914
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x10036708
push edi
push dword [ebp - 4]
call fcn.100c33b0
pop ecx
pop ecx
jmp 0x1003671a
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call fcn.10036945
add esp, 0xc
push dword [ebp - 4]
call fcn.100c1e10
push 8
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], eax
call fcn.100ce970
push 9
push dword [ebp - 4]
call fcn.100ce950
mov ecx, dword [ebp + 0x24]
add esp, 0x18
mov esi, dword [ebp + 0x14]
lea eax, [ecx - 1]
cmp eax, 7
ja 0x10036833
push dword [ebp + 0x20]
xor eax, eax
push ecx
push dword [ebp + 0x18]
inc eax
push dword [ebp - 0x18]
shl eax, cl
push esi
push dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
push dword [ebp + 0xc]
call fcn.1004b02f
mov ebx, eax
xor eax, eax
push eax
push eax
push eax
push 3
push dword [ebp + 0x24]
mov dword [ebp - 0x14], ebx
push esi
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.100d0250
mov ecx, dword [ebp - 0x1c]
add esp, 0x40
test ecx, ecx
jle 0x100367c1
lea edx, [ebp - 0x323]
mov esi, ecx
lea edi, [ebx + 0x51]
mov al, byte [edi + 1]
mov byte [edx - 1], al
mov al, byte [edi]
lea edi, [edi + 4]
mov byte [edx], al
lea edx, [edx + 3]
mov al, byte [edi - 5]
mov byte [edx - 2], al
sub esi, 1
jne 0x100367a0
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp + 0x14]
push ecx
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.100d0320
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.100cf4b0
add esp, 0x18
test byte [ebp + 0x1c], 2
jne 0x1003682c
xor esi, esi
cmp dword [ebp + 0x14], esi
jle 0x1003680d
mov edi, dword [ebp + 0x14]
push esi
push ebx
call fcn.1004b23f
push eax
push dword [ebp - 4]
call fcn.100cf900
add esp, 0x10
inc esi
cmp esi, edi
jl 0x100367f2
mov edi, dword [ebp - 0xc]
push ebx
call fcn.1004b1f3
pop ecx
jmp 0x100368a3
push esi
push ebx
call fcn.1004b23f
push eax
push dword [ebp - 4]
call fcn.100cf900
add esp, 0x10
sub esi, 1
jns 0x10036819
jmp 0x1003680d
push ebx
push ebx
push ebx
push dword [ebp + 0x28]
push 8
push esi
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.100d0250
push dword [ebp - 4]
call fcn.100c8a70
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.100cf4b0
add esp, 0x30
test byte [ebp + 0x1c], 2
je 0x10036889
lea ebx, [esi - 1]
imul ebx, dword [ebp + 0x18]
add ebx, dword [ebp + 0xc]
test esi, esi
jle 0x100368a3
push ebx
push dword [ebp - 4]
call fcn.100cf900
sub ebx, dword [ebp + 0x18]
pop ecx
pop ecx
sub esi, 1
jne 0x10036874
jmp 0x100368a3
mov ebx, dword [ebp + 0xc]
test esi, esi
jle 0x100368a3
push ebx
push dword [ebp - 4]
call fcn.100cf900
add ebx, dword [ebp + 0x18]
pop ecx
pop ecx
sub esi, 1
jne 0x10036890
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.100cebf0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.100cde70
xor esi, esi
add esp, 0x10
inc esi
xor ebx, ebx
test edi, edi
je 0x100368dd
push edi
call fcn.100232fb
pop ecx
test esi, esi
jne 0x10036912
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10036912
test esi, esi
je 0x10036902
push 1
push dword [ebp - 0x20]
call fcn.1004ea60
mov edi, eax
test edi, edi
je 0x10036902
push dword [ebp - 0x20]
push dword [ebp - 0x10]
push edi
call fcn.10025090
add esp, 0xc
mov esi, edi
push dword [ebp - 0x10]
push ebx
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x24