Function at 0x512450
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c6f7d
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x72cec4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
mov ecx, esi
call fcn.0050a2e0
or ebx, 0xffffffff
mov dword [ebp - 4], 0
cmp dword [ebp - 0x1c], 0
jne 0x51249d
push str.Empty_filename_passed_to_function
jmp 0x5124bb
xor eax, eax
lea ecx, [ebp - 0x24]
push 1
mov word [ebp - 0x14], ax
push eax
push dword [ebp - 0x14]
call fcn.00493da0
cmp eax, 0xffffffff
je 0x5124ee
push str.Broken_filename_passed_to_function
movaps xmm0, xmmword [0x5e4ea0]
lea eax, [ebp - 0x44]
push eax
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], 0x5cf218
call fcn.004a34c0
add esp, 8
call fcn.005a2cca
mov dword [eax], 0x16
xor al, al
mov byte [ebp - 0xd], al
jmp 0x51272c
cmp byte [ebp + 0xc], 0
je 0x5126ed
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.004e4cb0
push eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 1
push eax
call fcn.004e6550
mov edx, dword [ebp - 0x24]
mov esi, eax
add esp, 0x10
mov ecx, dword [esi]
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 4]
mov dword [esi], edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x20], ecx
mov eax, dword [esi + 8]
mov dword [esi + 4], edx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x512560
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x512560
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x51258a
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x51258a
push 4
push 2
push dword [ebp - 0x3c]
call fcn.00461780
add esp, 0xc
mov esi, dword [ebp - 0x1c]
mov edi, esi
mov dword [ebp - 0x14], 0
test edi, edi
jle 0x5126e3
nop
mov ebx, dword [ebp - 0x20]
cmp edi, esi
cmovb esi, edi
cmp esi, 2
jne 0x5125d9
movzx ecx, word [ebx]
lea eax, [ecx - 0x41]
cmp eax, 0x39
ja 0x5125c0
lea eax, [ecx - 0x5b]
cmp eax, 5
ja 0x5125ce
cmp ecx, 0x7f
jbe 0x5125d9
call fcn.00494250
test al, al
je 0x5125d9
cmp word [ebx + 2], 0x3a
je 0x5126e3
push esi
push ebx
lea ecx, [ebp - 0x30]
call fcn.0048f210
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.00511300
add esp, 8
test al, al
je 0x5126b2
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00531a50
add esp, 8
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.00498670
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp - 0x3c]
test eax, eax
mov byte [ebp - 4], 2
setne byte [ebp - 0xd]
or ebx, 0xffffffff
test ecx, ecx
je 0x512652
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x512652
push 4
push 2
push dword [ebp - 0x3c]
call fcn.00461780
add esp, 0xc
cmp byte [ebp - 0xd], 0
je 0x5126a9
mov eax, 0x5c
lea ecx, [ebp - 0x24]
mov word [ebp - 0x18], ax
mov eax, dword [ebp - 0x14]
push 1
dec eax
push eax
push dword [ebp - 0x18]
call fcn.004943d0
mov edi, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x51269a
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x51269a
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov dword [ebp - 0x14], edi
test edi, edi
jle 0x5126e3
mov esi, dword [ebp - 0x1c]
jmp 0x5125a0
cmp dword [ebp - 0x14], 0
setne al
jmp 0x5126b4
xor al, al
mov ecx, dword [ebp - 0x30]
mov byte [ebp - 0xd], al
test ecx, ecx
je 0x5126db
mov eax, 0xffffffff
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x5126db
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov al, byte [ebp - 0xd]
or ebx, 0xffffffff
jmp 0x51272c
mov al, 1
or ebx, 0xffffffff
mov byte [ebp - 0xd], al
jmp 0x51272c
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
call fcn.0050a2e0
push eax
mov byte [ebp - 4], 4
call fcn.00512d80
mov edx, dword [ebp - 0x3c]
add esp, 4
mov byte [ebp - 0xd], al
test edx, edx
je 0x51272c
mov ecx, ebx
lock xadd dword [edx], ecx
cmp ecx, 1
jne 0x51272c
push 4
push 2
push dword [ebp - 0x3c]
call fcn.00461780
mov al, byte [ebp - 0xd]
add esp, 0xc
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x51274e
lock xadd dword [ecx], ebx
cmp ebx, 1
jne 0x51274e
push 4
push 2
push dword [ebp - 0x24]
call fcn.00461780
mov al, byte [ebp - 0xd]
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret