Function at 0x405240
Capabilities:
Delete registry key

Disassembly:
push 0xffffffffffffffff
push 0x42aec0
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov eax, dword [0x436b90]
xor eax, esp
push eax
lea eax, [esp + 0x54]
mov dword fs:[0], eax
mov eax, dword [esp + 0x64]
mov eax, dword [eax]
mov ecx, dword [eax + 0x1c]
cmp dword [eax + 0xc], ecx
jle 0x40528f
test ecx, ecx
jl 0x40528a
cmp ecx, dword [eax + 0xc]
jge 0x40528a
mov edx, dword [eax + 8]
mov eax, dword [edx + ecx*4]
mov dword [esp + 0x20], eax
jmp 0x405297
call fcn.00411116
mov dword [esp + 0x20], 0
call fcn.004111f0
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4052b1
push 0x80004005
call fcn.00401160
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x5c], 0
call fcn.004111f0
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4052e3
push 0x80004005
call fcn.00401160
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
lea ecx, [esp + 0x40]
mov byte [esp + 0x5c], 1
call fcn.0041433a
mov byte [esp + 0x5c], 2
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
push 0
push str.Registry.Keys
call eax
test eax, eax
je 0x40580d
mov dword [esp + 0x2c], 0
jmp 0x405330
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov edx, dword [edx + 0x60]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x68], 0
call edx
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jg 0x405357
or eax, 0xffffffff
jmp 0x405371
push 0x5c
push eax
call fcn.00417dd1
add esp, 8
test eax, eax
jne 0x40536b
or eax, 0xffffffff
jmp 0x405371
sub eax, dword [esp + 0x18]
sar eax, 1
push eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x20]
call fcn.00405920
mov byte [esp + 0x5c], 3
mov eax, dword [eax]
lea edi, [eax - 0x10]
lea ebx, [esi - 0x10]
cmp edi, ebx
je 0x40543a
cmp dword [ebx + 0xc], 0
lea ebp, [ebx + 0xc]
jl 0x405428
mov ecx, dword [edi]
cmp ecx, dword [ebx]
jne 0x405428
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x4053cd
cmp eax, dword [edi]
jne 0x4053cd
mov esi, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x405408
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x40587a
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [esi + 0x10]
push eax
call fcn.00417991
add esp, 0x10
or ecx, 0xffffffff
lock xadd dword [ebp], ecx
dec ecx
test ecx, ecx
jg 0x40541f
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add esi, 0x10
mov dword [esp + 0x14], esi
jmp 0x40543a
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00402290
mov esi, dword [esp + 0x14]
mov byte [esp + 0x5c], 2
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40545f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebp, ebp
mov edi, 0x4380c0
mov eax, dword [edi]
test eax, eax
je 0x405484
push eax
push esi
call fcn.00417d40
add esp, 8
test eax, eax
jne 0x40547d
mov ebp, dword [edi + 4]
add edi, 8
test ebp, ebp
je 0x405466
mov ecx, dword [esp + 0x24]
add ecx, 1
push ecx
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], ebp
call fcn.004058f0
mov byte [esp + 0x5c], 4
mov eax, dword [eax]
lea edi, [eax - 0x10]
lea ebx, [esi - 0x10]
cmp edi, ebx
je 0x405558
cmp dword [ebx + 0xc], 0
lea ebp, [ebx + 0xc]
jl 0x405542
mov ecx, dword [edi]
cmp ecx, dword [ebx]
jne 0x405542
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x4054e7
cmp eax, dword [edi]
jne 0x4054e7
mov esi, edi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x405522
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x40587a
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [esi + 0x10]
push eax
call fcn.00417991
add esp, 0x10
or ecx, 0xffffffff
lock xadd dword [ebp], ecx
dec ecx
test ecx, ecx
jg 0x405539
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add esi, 0x10
mov dword [esp + 0x14], esi
jmp 0x405554
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00402290
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
mov byte [esp + 0x5c], 2
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40557d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x24]
push ecx
push 0xf003f
xor ebx, ebx
push ebx
push esi
push ebp
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40560f
lea edx, [esp + 0x64]
test edx, edx
je 0x4055ac
mov eax, dword [esp + 0x24]
mov dword [esp + 0x64], eax
jmp 0x4055b7
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x64]
lea edx, [esp + 0x40]
push edx
push eax
call fcn.00403e90
add esp, 8
test eax, eax
jne 0x4055f8
mov edx, dword [esp + 0x64]
lea ecx, [esp + 0x40]
push ecx
push edx
call fcn.00403f80
add esp, 8
test eax, eax
jne 0x4055f8
mov ebx, esi
mov edi, ebp
call fcn.00404070
test eax, eax
je 0x4055f8
mov dword [esp + 0x2c], 1
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x48]
call fcn.004143d8
mov eax, dword [esp + 0x64]
push eax
jmp 0x4057ea
push str.kernel32.dll
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x405651
push str.IsWow64Process
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x405644
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x1c], 0
je 0x4057f0
cmp dword [0x43ad84], 0
mov eax, 0x100
jne 0x40566c
xor eax, eax
lea edx, [esp + 0x1c]
push edx
or eax, 0xf003f
push eax
push 0
push esi
push ebp
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4057f0
lea eax, [esp + 0x64]
test eax, eax
je 0x4056a3
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x64], ecx
jmp 0x4056ae
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x64]
lea eax, [esp + 0x40]
push eax
push ecx
call fcn.00403e90
add esp, 8
test eax, eax
jne 0x4057d8
mov eax, dword [esp + 0x64]
lea edx, [esp + 0x40]
push edx
push eax
call fcn.00403f80
add esp, 8
test eax, eax
jne 0x4057d8
xor ebx, ebx
call fcn.004087e0
push eax
lea ecx, [esp + 0x34]
call fcn.004023a0
mov byte [esp + 0x5c], 5
cmp dword [esi - 4], 1
jle 0x40570f
mov ecx, dword [esi - 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.004020b0
mov esi, dword [esp + 0x14]
mov edi, esi
call fcn.004086f0
test esi, esi
jne 0x40571e
xor eax, eax
jmp 0x405738
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405723
sub eax, edx
sar eax, 1
js 0x40587f
cmp eax, dword [esi - 8]
jg 0x40587f
mov dword [esi - 0xc], eax
mov word [esi + eax*2], 0
cmp dword [0x43ad84], 0
mov eax, 0x100
jne 0x40575a
xor eax, eax
lea edx, [esp + 0x28]
push edx
or eax, 0xf003f
push eax
push 0
push esi
push ebp
mov dword [esp + 0x3c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4057b3
lea eax, [esp + 0x3c]
test eax, eax
je 0x405789
mov ebx, dword [esp + 0x28]
jmp 0x405794
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x30]
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x4057ac
mov dword [esp + 0x2c], 1
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x5c], 2
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4057d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x48]
call fcn.004143d8
mov ecx, dword [esp + 0x64]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov eax, dword [edx + 0x20]
call eax
test eax, eax
jne 0x405330
cmp dword [esp + 0x2c], eax
jne 0x405306
lea ecx, [esp + 0x40]
mov byte [esp + 0x5c], 1
call fcn.0041450c
lea eax, [esi - 0x10]
mov byte [esp + 0x5c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40583c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x5c], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405864
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 4
call fcn.00402130
push 0x80070057
call fcn.00401160
int3