Function at 0x402570
Capabilities:
Set registry value

Disassembly:
sub esp, 0x18
push ebx
push edi
mov ebx, eax
push 0x5c
push ebx
mov dword [esp + 0x10], 0
call fcn.0040b240
mov edi, eax
add esp, 8
test edi, edi
je 0x4029ce
mov eax, dword [esp + 0x28]
push ebp
push esi
lea ecx, [esp + 0x18]
call fcn.00411d30
mov ebp, dword [0x424d88]
mov esi, edi
sub esi, ebx
je 0x4025e5
lea eax, [esi + 0xd]
push eax
call fcn.0040ade5
add esp, 4
test eax, eax
je 0x4025e5
lea ecx, [esi + 1]
mov dword [eax], 1
mov byte [eax + esi + 0xc], 0
mov dword [eax + 4], esi
mov dword [eax + 8], esi
lea ebp, [eax + 0xc]
cmp ecx, esi
jb 0x4025e5
push esi
push ebx
push ebp
call fcn.0040b610
add esp, 0xc
lea ebx, [edi + 1]
lea edi, [esp + 0x14]
call fcn.00401300
mov edi, dword [esp + 0x14]
mov ecx, 0x41fd14
mov eax, edi
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402620
test dl, dl
je 0x40261c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402620
add eax, 2
add ecx, 2
test dl, dl
jne 0x402600
xor eax, eax
jmp 0x402625
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402664
push 0x41fca5
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
lea edi, [esp + 0x14]
call fcn.00402230
mov edi, dword [esp + 0x14]
test eax, eax
je 0x402664
lea edx, [esi + 1]
cmp edx, esi
jb 0x40265d
push esi
push 0x41fca5
push edi
call fcn.0040b610
add esp, 0xc
mov dword [edi - 8], esi
mov byte [esi + edi], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea ebx, [ebx]
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
push 0xf003f
push 0
push 0x41fca5
push 0
push ebp
push edx
call esi
test eax, eax
je 0x4026fb
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c]
push ebp
call eax
test al, al
jne 0x402670
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [edi - 0xc]
cmp ecx, 0x424d78
je 0x4026cb
add edi, 0xfffffff4
push edi
call ebx
test eax, eax
jg 0x4026cb
push edi
call fcn.0040b07a
add esp, 4
lea edx, [ebp - 0xc]
cmp edx, 0x424d78
je 0x4026e9
add ebp, 0xfffffff4
push ebp
call ebx
test eax, eax
jg 0x4026e9
push ebp
call fcn.0040b07a
add esp, 4
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x424d78
jmp 0x4029b7
cmp dword [esp + 0x24], 1
jne 0x402757
mov eax, dword [ebp - 8]
mov edx, dword [0x424d88]
push ebp
push eax
mov eax, dword [esp + 0x20]
mov ebx, dword [eax - 8]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x40], edx
call fcn.00402090
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push esi
push 5
call eax
lea ecx, [esi - 0xc]
cmp ecx, 0x424d78
je 0x402757
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402757
push esi
call fcn.0040b07a
add esp, 4
mov esi, dword [esp + 0x30]
jmp 0x402760
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x24]
push eax
push ecx
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4027fa
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp - 8]
push ebp
or eax, 3
push ecx
mov dword [esp + 0x18], eax
mov eax, dword [0x424d88]
push str.Registry_value
push str.Registry_value
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x3c]
push edx
mov ebx, eax
call fcn.00402090
mov ecx, dword [edi - 8]
mov esi, dword [esp + 0x30]
mov eax, dword [0x424d88]
mov ebx, dword [esi - 8]
push edi
push ecx
push esi
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], eax
call fcn.00402090
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x14]
mov eax, dword [eax + 0x1c]
push edx
push ebx
call eax
test al, al
je 0x4027fe
mov byte [esp + 0x30], 1
jmp 0x402803
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x30], 0
test byte [esp + 0x10], 2
je 0x402831
and dword [esp + 0x10], 0xfffffffd
lea ecx, [ebx - 0xc]
cmp ecx, 0x424d78
je 0x402831
add ebx, 0xfffffff4
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402831
push ebx
call fcn.0040b07a
add esp, 4
test byte [esp + 0x10], 1
je 0x40285f
and dword [esp + 0x10], 0xfffffffe
lea edx, [esi - 0xc]
cmp edx, 0x424d78
je 0x40285f
lea ebx, [esi - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40285f
push ebx
call fcn.0040b07a
add esp, 4
cmp byte [esp + 0x30], 0
jne 0x402760
cmp dword [esp + 0x1c], 0
jne 0x40295e
mov eax, dword [0x424d88]
mov ecx, dword [ebp - 8]
push ebp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x1c]
mov ebx, dword [eax - 8]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
call fcn.00402090
mov eax, dword [0x424d88]
push 0x41fd08
push 0x41fd08
mov dword [esp + 0x44], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [esp + 0x38]
mov ebx, dword [eax - 8]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00402090
mov eax, dword [edi - 8]
mov esi, dword [esp + 0x3c]
mov edx, dword [0x424d88]
mov ebx, dword [esi - 8]
push edi
push eax
push esi
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x48], edx
call fcn.00402090
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x38]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push ebx
push 6
call eax
lea ecx, [ebx - 0xc]
cmp ecx, 0x424d78
je 0x402916
add ebx, 0xfffffff4
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402916
push ebx
call fcn.0040b07a
add esp, 4
lea edx, [esi - 0xc]
cmp edx, 0x424d78
je 0x402938
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402938
push esi
call fcn.0040b07a
add esp, 4
mov eax, dword [esp + 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x424d78
je 0x40295e
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40295e
push esi
call fcn.0040b07a
add esp, 4
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea eax, [edi - 0xc]
cmp eax, 0x424d78
je 0x40298c
add edi, 0xfffffff4
push edi
call ebx
test eax, eax
jg 0x40298c
push edi
call fcn.0040b07a
add esp, 4
lea ecx, [ebp - 0xc]
cmp ecx, 0x424d78
je 0x4029aa
add ebp, 0xfffffff4
push ebp
call ebx
test eax, eax
jg 0x4029aa
push ebp
call fcn.0040b07a
add esp, 4
mov eax, dword [esp + 0x18]
lea edx, [eax - 0xc]
cmp edx, 0x424d78
je 0x4029cc
lea esi, [eax - 0xc]
push esi
call ebx
test eax, eax
jg 0x4029cc
push esi
call fcn.0040b07a
add esp, 4
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x18
ret 0x14