Function at 0x409790
Capabilities:
Check if file exists
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ae789
mov eax, dword fs:[0]
push eax
sub esp, 0x2f0
mov eax, dword [0x629214]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
cmp dword [edi + 0x10], 3
mov dword [ebp - 0x2fc], edi
jbe 0x409b62
push 0x619204
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040a1e0
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 4], ebx
xor ecx, ecx
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x30], cx
push 0x24c
lea edx, [ebp - 0x2f0]
push ebx
mov byte [ebp - 4], 1
push edx
mov dword [ebp - 0x2f4], ebx
call fcn.0047b9a0
mov eax, dword [ebp - 0xa0]
mov esi, 8
add esp, 0xc
cmp dword [ebp - 0x8c], esi
jae 0x409833
lea eax, [ebp - 0xa0]
lea ecx, [ebp - 0x2f4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x2f8], eax
cmp eax, 0xffffffff
jne 0x40988d
cmp dword [ebp - 0x1c], esi
jb 0x40985d
mov edx, dword [ebp - 0x30]
push edx
call fcn.00478c1a
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x30], ax
cmp dword [ebp - 0x8c], esi
jb 0x409b8f
mov ecx, dword [ebp - 0xa0]
push ecx
call fcn.00478c1a
add esp, 4
jmp 0x409b8f
mov al, byte [ebp - 0x2f4]
test al, 0x10
je 0x409a08
mov ecx, 0x61920c
lea eax, [ebp - 0x2c8]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4098cc
cmp dx, bx
je 0x4098c8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4098cc
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x4098a6
xor eax, eax
jmp 0x4098d1
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x409b00
mov ecx, 0x619210
lea eax, [ebp - 0x2c8]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40990a
cmp dx, bx
je 0x409906
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40990a
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x4098e4
xor eax, eax
jmp 0x40990f
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x409b00
xor edx, edx
lea eax, [ebp - 0x2c8]
mov word [ebp - 0x4c], dx
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x409930
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2c8]
lea esi, [ebp - 0x4c]
call fcn.00406130
push 0x619200
lea eax, [ebp - 0x84]
push edi
push eax
mov byte [ebp - 4], 2
call fcn.0040a1e0
add esp, 0xc
mov ecx, eax
lea edx, [ebp - 0x68]
push edx
mov eax, esi
mov byte [ebp - 4], 3
call fcn.0040a2d0
add esp, 4
mov esi, 8
cmp dword [ebp - 0x70], esi
jb 0x409994
mov eax, dword [ebp - 0x84]
push eax
call fcn.00478c1a
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x70], 7
mov dword [ebp - 0x74], ebx
mov word [ebp - 0x84], cx
mov byte [ebp - 4], 6
cmp dword [ebp - 0x38], esi
jb 0x4099bc
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00478c1a
add esp, 4
lea ecx, [ebp - 0x68]
xor eax, eax
push ecx
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], ebx
mov word [ebp - 0x4c], ax
call fcn.00409790
mov eax, dword [ebp - 0x68]
add esp, 4
cmp dword [ebp - 0x54], esi
jae 0x4099e3
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x54], esi
jb 0x409b00
mov edx, dword [ebp - 0x68]
push edx
call fcn.00478c1a
add esp, 4
jmp 0x409b00
test al, 6
jne 0x409b00
xor eax, eax
mov word [ebp - 0x68], ax
lea eax, [ebp - 0x2c8]
mov dword [ebp - 0x54], 7
mov dword [ebp - 0x58], ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x409a30
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2c8]
lea esi, [ebp - 0x68]
call fcn.00406130
push 0x619200
lea ecx, [ebp - 0x4c]
push edi
push ecx
mov byte [ebp - 4], 7
call fcn.0040a1e0
add esp, 0xc
mov ecx, eax
lea edx, [ebp - 0x84]
push edx
mov eax, esi
mov byte [ebp - 4], 8
call fcn.0040a2d0
add esp, 4
mov edi, eax
lea esi, [ebp - 0x30]
mov byte [ebp - 4], 9
call fcn.00404480
mov esi, 8
cmp dword [ebp - 0x70], esi
jb 0x409aa2
mov eax, dword [ebp - 0x84]
push eax
call fcn.00478c1a
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x74], ebx
mov word [ebp - 0x84], cx
cmp dword [ebp - 0x38], esi
jb 0x409ac7
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00478c1a
add esp, 4
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov word [ebp - 0x4c], ax
cmp dword [ebp - 0x54], esi
jb 0x409ae8
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.00478c1a
add esp, 4
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x1c], esi
jae 0x409af3
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [ebp - 0x2fc]
mov esi, dword [ebp - 0x2f8]
lea edx, [ebp - 0x2f4]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40988d
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, 8
cmp dword [ebp - 0x1c], esi
jb 0x409b39
mov eax, dword [ebp - 0x30]
push eax
call fcn.00478c1a
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x30], cx
cmp dword [ebp - 0x8c], esi
jb 0x409b67
mov edx, dword [ebp - 0xa0]
push edx
call fcn.00478c1a
add esp, 4
jmp 0x409b67
mov esi, 8
cmp dword [edi + 0x14], esi
jb 0x409b70
mov eax, dword [edi]
jmp 0x409b72
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409b8f
cmp dword [edi + 0x14], esi
jb 0x409b86
mov eax, dword [edi]
jmp 0x409b88
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00478c25
mov esp, ebp
pop ebp
ret