Function at 0x50a470
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bef5d
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x71c56c]
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.00502320
or ebx, 0xffffffff
mov dword [ebp - 4], 0
cmp dword [ebp - 0x1c], 0
jne 0x50a4bd
push str.Empty_filename_passed_to_function
jmp 0x50a4db
xor eax, eax
lea ecx, [ebp - 0x24]
push 1
mov word [ebp - 0x14], ax
push eax
push dword [ebp - 0x14]
call fcn.0048bdf0
cmp eax, 0xffffffff
je 0x50a50e
push str.Broken_filename_passed_to_function
movaps xmm0, xmmword [0x5cecd0]
lea eax, [ebp - 0x44]
push eax
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], 0x5c7218
call fcn.0049b510
add esp, 8
call fcn.0059acca
mov dword [eax], 0x16
xor al, al
mov byte [ebp - 0xd], al
jmp 0x50a74c
cmp byte [ebp + 0xc], 0
je 0x50a70d
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.004dccd0
push eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 1
push eax
call fcn.004de580
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 0x50a580
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50a580
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x50a5aa
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50a5aa
push 4
push 2
push dword [ebp - 0x3c]
call fcn.004597e0
add esp, 0xc
mov esi, dword [ebp - 0x1c]
mov edi, esi
mov dword [ebp - 0x14], 0
test edi, edi
jle 0x50a703
nop
mov ebx, dword [ebp - 0x20]
cmp edi, esi
cmovb esi, edi
cmp esi, 2
jne 0x50a5f9
movzx ecx, word [ebx]
lea eax, [ecx - 0x41]
cmp eax, 0x39
ja 0x50a5e0
lea eax, [ecx - 0x5b]
cmp eax, 5
ja 0x50a5ee
cmp ecx, 0x7f
jbe 0x50a5f9
call fcn.0048c2a0
test al, al
je 0x50a5f9
cmp word [ebx + 2], 0x3a
je 0x50a703
push esi
push ebx
lea ecx, [ebp - 0x30]
call fcn.00487260
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.00509320
add esp, 8
test al, al
je 0x50a6d2
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00529a60
add esp, 8
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.004906d0
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 0x50a672
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50a672
push 4
push 2
push dword [ebp - 0x3c]
call fcn.004597e0
add esp, 0xc
cmp byte [ebp - 0xd], 0
je 0x50a6c9
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.0048c420
mov edi, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x50a6ba
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x50a6ba
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov dword [ebp - 0x14], edi
test edi, edi
jle 0x50a703
mov esi, dword [ebp - 0x1c]
jmp 0x50a5c0
cmp dword [ebp - 0x14], 0
setne al
jmp 0x50a6d4
xor al, al
mov ecx, dword [ebp - 0x30]
mov byte [ebp - 0xd], al
test ecx, ecx
je 0x50a6fb
mov eax, 0xffffffff
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x50a6fb
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov al, byte [ebp - 0xd]
or ebx, 0xffffffff
jmp 0x50a74c
mov al, 1
or ebx, 0xffffffff
mov byte [ebp - 0xd], al
jmp 0x50a74c
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
call fcn.00502320
push eax
mov byte [ebp - 4], 4
call fcn.0050ada0
mov edx, dword [ebp - 0x3c]
add esp, 4
mov byte [ebp - 0xd], al
test edx, edx
je 0x50a74c
mov ecx, ebx
lock xadd dword [edx], ecx
cmp ecx, 1
jne 0x50a74c
push 4
push 2
push dword [ebp - 0x3c]
call fcn.004597e0
mov al, byte [ebp - 0xd]
add esp, 0xc
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x50a76e
lock xadd dword [ecx], ebx
cmp ebx, 1
jne 0x50a76e
push 4
push 2
push dword [ebp - 0x24]
call fcn.004597e0
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