Function at 0x10021760
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1011543d
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x10159140]
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 eax, dword [ebp + 8]
lea esi, [edi + 4]
push esi
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x6c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [edi + 0x64], 0
mov dword [ebp - 4], 0
je 0x100217bd
mov ecx, edi
call fcn.1001d0f0
mov byte [edi + 0x64], 0
jmp 0x100218d4
cmp dword [edi + 0x28], 0
jle 0x100218d4
mov eax, dword [edi + 0x20]
cmp eax, dword [edi + 0x24]
jbe 0x100218d4
cmp eax, 0xffffffff
je 0x100218d4
mov eax, dword [edi + 0x1c]
cmp eax, 0xffffffff
je 0x100217f4
push eax
call fcn.100cd850
add esp, 4
mov dword [edi + 0x1c], 0xffffffff
mov eax, dword [edi + 0x28]
mov ecx, edi
dec eax
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.10017d20
cmp dword [ebp - 0x4c], 7
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 1
cmova eax, dword [ebp - 0x60]
push eax
call fcn.100ca0e0
mov ebx, dword [edi + 0x28]
add esp, 4
sub ebx, 2
js 0x100218a8
push ebx
lea eax, [ebp - 0x48]
mov ecx, edi
push eax
call fcn.10017d20
lea eax, [ebx + 1]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.10017d20
cmp dword [ebp - 0x14], 7
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x44]
cmova ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x30], 7
push ecx
cmova eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
lea ecx, [ebp - 0x2c]
call fcn.10017170
mov eax, dword [ebp - 0x2c]
push 8
push eax
mov dword [ebp - 0x2c], 0
call fcn.1007d8b0
add esp, 8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
call fcn.10017170
mov eax, dword [ebp - 0x48]
push 8
push eax
mov dword [ebp - 0x48], 0
call fcn.1007d8b0
add esp, 8
sub ebx, 1
jns 0x10021828
mov ecx, edi
call fcn.1001d0f0
lea ecx, [ebp - 0x64]
mov byte [edi + 0x64], 0
mov byte [ebp - 4], 0
call fcn.10017170
mov eax, dword [ebp - 0x64]
push 8
push eax
mov dword [ebp - 0x64], 0
call fcn.1007d8b0
add esp, 8
push dword [ebp - 0x68]
lea eax, [ebp - 0x48]
push eax
call fcn.1001b6e0
push eax
lea eax, [ebp - 0x64]
mov byte [ebp - 4], 3
push eax
call fcn.1001b3e0
push eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 4
push eax
call fcn.10017ed0
add esp, 0x18
lea ecx, [ebp - 0x64]
call fcn.10017170
mov eax, dword [ebp - 0x64]
push 8
push eax
mov dword [ebp - 0x64], 0
call fcn.1007d8b0
mov ecx, dword [edi + 0x1c]
lea eax, [ebp - 0x28]
add esp, 8
cmp dword [ebp - 0x14], 0xf
cmova eax, dword [ebp - 0x28]
cmp ecx, 0xffffffff
je 0x10021940
push dword [ebp - 0x18]
push eax
push ecx
call fcn.100cefb0
add esp, 0xc
mov ebx, eax
jmp 0x10021943
or ebx, 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.100170b0
mov eax, dword [ebp - 0x2c]
push 8
push eax
mov dword [ebp - 0x2c], 0
call fcn.1007d8b0
add esp, 8
lea ecx, [ebp - 0x48]
call fcn.10017170
mov eax, dword [ebp - 0x48]
push 8
push eax
mov dword [ebp - 0x48], 0
call fcn.1007d8b0
add esp, 8
cmp ebx, 0xffffffff
je 0x10021985
add dword [edi + 0x20], ebx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
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.1007e0c0
mov esp, ebp
pop ebp
ret 4