Function at 0x4918c0
Capabilities:
Delete directory

Disassembly:
mov eax, 0x3054
call fcn.00530230
mov eax, dword [0x58cb30]
xor eax, esp
mov dword [esp + 0x3050], eax
push ebx
mov ebx, dword [esp + 0x305c]
mov ecx, ebx
push ebp
mov ebp, dword [esp + 0x3068]
push esi
mov esi, dword [esp + 0x3068]
lea edx, [ecx + 2]
push edi
mov dword [esp + 0x14], ebx
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x491900
sub ecx, edx
sar ecx, 1
cmp ecx, 0x800
jae 0x491b21
push 0x800
push ebx
lea eax, [esp + 0x1068]
push eax
call fcn.004bdae0
mov edi, esi
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x491933
sub edi, ecx
sar edi, 1
je 0x49195e
push edi
lea eax, [esp + 0x1064]
push esi
push eax
call fcn.0053968d
add esp, 0xc
neg eax
sbb eax, eax
not eax
and edi, eax
xor esi, esi
cmp word [esp + 0x1060], si
je 0x4919aa
lea ebx, [ebx]
cmp esi, dword [ebp + 0x10]
jae 0x4919aa
cmp dword [ebp + 0x14], 8
mov eax, ebp
jb 0x491980
mov eax, dword [ebp]
movzx ecx, word [esp + esi*2 + 0x1060]
cmp cx, word [eax + esi*2]
jne 0x4919aa
push ecx
call fcn.004a2f40
test al, al
je 0x49199e
cmp esi, edi
jbe 0x49199e
mov edi, esi
inc esi
cmp word [esp + esi*2 + 0x1060], 0
jne 0x491970
lea ebx, [esp + 0x1060]
test edi, edi
je 0x4919d7
movzx eax, word [ebx + edi*2]
lea ebx, [ebx + edi*2]
push eax
call fcn.004a2f40
test al, al
je 0x4919d7
movzx eax, word [ebx + 2]
add ebx, 2
push eax
call fcn.004a2f40
test al, al
jne 0x4919c6
lea ecx, [esp + 0x1060]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4919e1
sub ecx, edx
sar ecx, 1
lea esi, [esp + ecx*2 + 0x105e]
cmp esi, ebx
jbe 0x491ac3
nop
movzx eax, word [esi]
push eax
call fcn.004a2f40
test al, al
je 0x491ab8
xor eax, eax
mov word [esi], ax
mov dword [esp + 0x1028], eax
mov dword [esp + 0x102c], eax
mov dword [esp + 0x1030], eax
mov dword [esp + 0x1034], eax
mov dword [esp + 0x1038], eax
mov dword [esp + 0x103c], eax
lea eax, [esp + 0x18]
push 1
push eax
lea eax, [esp + 0x1068]
push eax
call fcn.004930c0
test al, al
je 0x491ab8
cmp byte [esp + 0x1025], 0
je 0x491ab8
lea eax, [esp + 0x1060]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne cl
mov byte [esp + 0x13], cl
test eax, eax
jne 0x491ab4
push 0x800
lea eax, [esp + 0x2064]
push eax
lea eax, [esp + 0x1068]
push eax
call fcn.004a2bb0
test al, al
je 0x491ab0
lea eax, [esp + 0x2060]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne cl
jmp 0x491ab4
mov cl, byte [esp + 0x13]
test cl, cl
je 0x491b21
sub esi, 2
cmp esi, ebx
ja 0x491a00
mov ebx, dword [esp + 0x14]
mov ecx, ebx
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x491ad0
mov eax, dword [ebp + 0x14]
sub ecx, edx
sar ecx, 1
cmp ecx, eax
ja 0x491b0b
mov edi, ebp
cmp eax, 8
jb 0x491af0
mov edi, dword [ebp]
lea esi, [ecx + ecx]
mov dword [ebp + 0x10], ecx
push esi
push ebx
push edi
call fcn.00531d40
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
mov al, 1
jmp 0x491b23
push ebx
mov byte [esp + 0x18], 0
push dword [esp + 0x18]
push ecx
mov ecx, ebp
call fcn.00453050
mov al, 1
jmp 0x491b23
xor al, al
mov ecx, dword [esp + 0x3060]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00530218
add esp, 0x3054
ret 0xc