Function at 0x401300
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x62c
mov ecx, dword [esp + 0x638]
mov edx, dword [esp + 0x634]
push ebx
push ebp
push esi
lea eax, [esp + 0x1c]
push edi
push eax
xor edi, edi
mov ebp, 0x104
push ecx
push edx
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x38], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4013eb
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x138]
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x34]
push ecx
push edx
push edi
push str.EventMessageFile
push eax
call ebx
test eax, eax
jne 0x4013eb
mov esi, dword [esp + 0x640]
lea ecx, [esp + 0x34]
push ebp
lea edx, [esp + 0x13c]
push ecx
push edx
push esi
call fcn.00401100
lea eax, [esp + 0x44]
push eax
call fcn.00401270
add esp, 0x14
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x138]
push ecx
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x34]
push edx
push eax
push edi
push str.ParameterMessageFile
push ecx
mov dword [esp + 0x44], ebp
call ebx
test eax, eax
jne 0x4013eb
lea edx, [esp + 0x34]
push ebp
lea eax, [esp + 0x13c]
push edx
push eax
push esi
call fcn.00401100
lea ecx, [esp + 0x44]
push ecx
call fcn.00401270
add esp, 0x14
mov dword [esp + 0x24], eax
mov edi, eax
mov ebp, dword [esp + 0x64c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
mov esi, dword [ebp + 0x24]
add esi, ebp
cmp word [ebp + 0x1a], 0
jbe 0x4014b1
lea ebx, [esp + 0x23c]
jmp 0x40141f
mov edi, dword [esp + 0x24]
push 0x40a0e8
push esi
mov dword [ebx], esi
call fcn.00402490
add esp, 8
test eax, eax
je 0x401471
lea edx, [esp + 0x28]
add eax, 2
push edx
push 0x40a0e4
push eax
call fcn.00402451
mov ecx, dword [esp + 0x34]
add esp, 0xc
and ecx, 0xffff
test edi, edi
mov dword [esp + 0x28], ecx
je 0x401471
push 0
push 0
push ebx
mov eax, ecx
push 0
push eax
push edi
push 0x900
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add ebx, 4
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
mov edi, esi
not ecx
dec ecx
add eax, ecx
or ecx, 0xffffffff
mov dword [esp + 0x10], eax
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
not ecx
dec ecx
inc eax
mov dword [esp + 0x18], eax
lea esi, [esi + ecx + 1]
xor ecx, ecx
mov cx, word [ebp + 0x1a]
cmp eax, ecx
jl 0x40141b
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4014de
lea edx, [esp + 0x23c]
lea ecx, [esp + 0x14]
push edx
mov edx, dword [ebp + 0x14]
push 0
push ecx
push 0
push edx
push eax
push 0x2900
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x4014fd
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], 0
add eax, 2
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x14], eax
mov byte [eax], 0
mov ebx, dword [ebp + 0x24]
mov dword [esp + 0x18], 0
add ebx, ebp
cmp word [ebp + 0x1a], 0
jbe 0x4015b2
lea esi, [esp + 0x23c]
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x401555
mov edi, dword [esi]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
push 0x40a0e8
push ebx
call fcn.00402490
add esp, 8
test eax, eax
je 0x401584
mov eax, dword [esi]
push 0x40a0e8
push eax
call fcn.00402490
add esp, 8
test eax, eax
jne 0x401584
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
xor edx, edx
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x18]
mov dx, word [ebp + 0x1a]
not ecx
dec ecx
inc eax
add esi, 4
cmp eax, edx
lea ebx, [ebx + ecx + 1]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
jl 0x401520
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4015e6
mov edi, 0x40a0e0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x4015f6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
cmp byte [eax], 0
je 0x401651
mov dl, 0xd
mov bl, 0x20
mov cl, byte [0x40b634]
test cl, cl
mov cl, byte [eax]
je 0x401624
cmp cl, 0xa
je 0x401643
cmp cl, dl
je 0x401643
cmp cl, 9
je 0x401643
cmp cl, 0x2c
jne 0x401645
jmp 0x401643
cmp cl, dl
jne 0x401634
cmp byte [eax - 2], dl
jne 0x401634
mov byte [eax], bl
mov byte [eax + 1], bl
jmp 0x401645
cmp cl, 0xa
jne 0x401645
cmp byte [eax + 1], dl
je 0x401645
cmp byte [eax - 1], dl
je 0x401645
mov byte [eax], bl
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x401603
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x62c
ret