Function at 0x408770
Capabilities:
Delete directory
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411ed0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x328
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
call fcn.0040b4f0
test al, al
je 0x4087b1
lea eax, [ebp - 0x24]
push eax
call fcn.0040b590
add esp, 4
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x128]
lea edx, [ebp - 0x18]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
cmp eax, esi
push ecx
lea eax, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], 4
push esi
jne 0x408817
mov ebx, dword [ebp + 8]
push str.NormalFileCnt
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, str.File__d
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x408868
mov ebx, dword [ebp + 8]
push str.ConditionFileCnt
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, str.C_File__d
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x128]
push ecx
push str._BBOO__szFileFormat_file____s_
push 0
push edx
call fcn.00404400
add esp, 0x10
xor esi, esi
cmp esi, dword [ebp - 0x18]
jge 0x4088d2
lea eax, [ebp - 0x128]
push esi
lea ecx, [ebp - 0x330]
push eax
push ecx
call fcn.0040badf
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x22c]
add esp, 0xc
rep stosd dword es:[edi], eax
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x22c]
push edx
lea ecx, [ebp - 0x20]
push eax
push ecx
lea edx, [ebp - 0x330]
push 0
push edx
push ebx
mov dword [ebp - 0x14], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4088cf
mov ecx, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.004086e0
inc esi
jmp 0x40886a
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x128]
lea edx, [ebp - 0x18]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
test eax, eax
push ecx
lea eax, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x14], 4
push 0
jne 0x408933
push str.DirCnt
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, str.Dir__d
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x408981
push str.CDirCnt
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, str.CDir__d
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x128]
push ecx
push str._BBOO__szFileFormat_dir____s_
push 0
push edx
call fcn.00404400
add esp, 0x10
mov eax, dword [ebp - 0x18]
lea esi, [eax - 1]
test esi, esi
jl 0x408a54
lea ecx, [ebp - 0x128]
push esi
lea edx, [ebp - 0x330]
push ecx
push edx
call fcn.0040badf
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x22c]
add esp, 0xc
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x22c]
push eax
lea edx, [ebp - 0x20]
push ecx
push edx
lea eax, [ebp - 0x330]
push 0
push eax
push ebx
mov dword [ebp - 0x14], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408a2f
lea ecx, [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x408a10
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x22c]
push edx
push str.Directory__s_has_been_removed
push 0
push eax
call fcn.00404400
add esp, 0x10
dec esi
jmp 0x408987
lea ecx, [ebp - 0x22c]
push ecx
push str.Directory__s_has_not_been_removed____________r_n
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x1c]
push eax
push edx
call fcn.00404400
add esp, 0x10
dec esi
jmp 0x408987
mov dword [ebp - 4], 0xffffffff
call fcn.0040b4f0
test al, al
je 0x408a70
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.0040b550
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8