Function at 0x1031900
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa40
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push edi
mov edi, ecx
xor eax, eax
cmp dword [edi], 5
mov dword [ebp - 0xa40], edi
mov dword [ebp - 0xa34], ebx
mov dword [ebp - 0xa30], ebx
mov dword [ebp - 0xa38], ebx
mov dword [ebp - 0xa1c], ebx
mov dword [ebp - 0x408], ebx
jne 0x1031d8f
push esi
lea eax, [ebp - 0xa1c]
push eax
call fcn.0102fb20
mov esi, eax
cmp esi, ebx
jne 0x1031d34
mov esi, dword [ebp - 0xa1c]
mov eax, dword [esi]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
mov dword [ebp - 0xa38], eax
jne 0x1031996
mov esi, 8
jmp 0x1031d34
mov ecx, dword [esi]
add ecx, ecx
add ecx, ecx
push ecx
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [edi + 4]
mov dword [ebp - 0xa2c], eax
mov eax, dword [eax]
lea edx, [ebp - 0xa34]
push edx
mov edx, dword [edi + 0x408]
or eax, 8
push eax
push ebx
lea ecx, [edi + 8]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp esi, ebx
jne 0x1031d34
mov edx, dword [ebp - 0xa34]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xa20]
push eax
lea ecx, [ebp - 0x204]
push ecx
push 0
push edx
mov dword [ebp - 0xa28], ebx
mov dword [ebp - 0xa20], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
test esi, esi
jne 0x1031b6c
call fcn.010247e0
push eax
lea eax, [ebp - 0x204]
push 0x1001684
push eax
call dword [sym.imp.MSVCR80.dll__wcsicmp_l]
add esp, 0xc
test eax, eax
je 0x1031b31
call fcn.010247e0
push eax
push 2
lea ecx, [ebp - 0x204]
push ecx
push 0x101a524
call dword [sym.imp.MSVCR80.dll__wcsnicmp_l]
add esp, 0x10
test eax, eax
jne 0x1031b31
lea edx, [ebp - 0xa24]
push edx
mov edx, dword [ebp - 0xa38]
lea eax, [ebp - 0xa3c]
push eax
mov eax, dword [ebp - 0xa1c]
lea ecx, [ebp - 0xa28]
push ecx
push edx
push eax
lea ecx, [ebp - 0x204]
push ecx
mov ecx, edi
call fcn.0102eb10
mov esi, eax
test esi, esi
jne 0x1031d32
mov edx, dword [ebp - 0xa24]
cmp dword [ebp - 0xa3c], edx
je 0x1031b31
mov edx, dword [ebp - 0xa2c]
mov dword [ebp - 0x60c], eax
lea eax, [ebp - 0x60c]
push eax
lea ecx, [ebp - 0x204]
push ecx
push edx
call fcn.0102c790
mov esi, eax
test esi, esi
jne 0x1031d32
mov eax, dword [edi + 0x408]
push eax
lea ecx, [ebp - 0x60c]
push ecx
push 7
lea ecx, [ebp - 0xa18]
call fcn.0102bda0
lea edx, [edi + 0x208]
push edx
lea ecx, [ebp - 0xa18]
call fcn.0102d050
mov esi, eax
test esi, esi
jne 0x1031d32
mov eax, dword [ebp - 0xa24]
push 1
push eax
push 0x1018350
lea ecx, [ebp - 0xa18]
call fcn.0102c000
mov esi, eax
test esi, esi
jne 0x1031d32
mov eax, dword [ebp - 0xa34]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0xa20]
push ecx
lea edx, [ebp - 0x204]
push edx
add ebx, 1
push ebx
push eax
mov dword [ebp - 0xa20], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
test esi, esi
je 0x1031a18
cmp esi, 0x103
jne 0x1031b78
xor esi, esi
jmp 0x1031b80
test esi, esi
jne 0x1031d32
mov ecx, dword [ebp - 0xa28]
mov edx, dword [ebp - 0xa1c]
cmp ecx, dword [edx]
je 0x1031d32
mov ecx, dword [ebp - 0xa2c]
lea eax, [ebp - 0x408]
push eax
push 7
push ecx
call fcn.0102c730
mov esi, eax
test esi, esi
jne 0x1031d32
lea eax, [ebp - 0x404]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1031bc0
sub eax, edx
mov edx, dword [ebp - 0xa1c]
sar eax, 1
mov dword [ebp - 0xa2c], eax
xor eax, eax
cmp dword [edx], eax
mov edi, 1
mov dword [ebp - 0xa28], eax
jbe 0x1031d32
mov dword [ebp - 0xa24], eax
jmp 0x1031c00
mov ecx, dword [ebp - 0xa38]
cmp dword [ecx + eax*4], 0
jne 0x1031d11
mov ebx, 0xff
sub ebx, dword [ebp - 0xa2c]
lea edx, [edi + 1]
mov dword [ebp - 0xa20], edx
xor esi, esi
push edi
mov word [ebp - 0x206], si
call fcn.010247e0
push eax
mov eax, dword [ebp - 0xa2c]
push 0x10184a4
lea eax, [ebp + eax*2 - 0x404]
push ebx
push eax
call dword [sym.imp.MSVCR80.dll__snwprintf_l]
add esp, 0x14
test eax, eax
jge 0x1031c5a
mov esi, 0x6f
test esi, esi
jne 0x1031d32
mov edx, dword [ebp - 0x408]
lea eax, [ebp - 0xa3c]
push eax
lea ecx, [ebp - 0xa30]
push ecx
mov ecx, dword [ebp - 0xa40]
push esi
or edx, 0x20007
push edx
mov edx, dword [ecx + 0x408]
push esi
push esi
push esi
lea eax, [ebp - 0x404]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
jne 0x1031d32
mov eax, dword [ebp - 0xa30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
cmp dword [ebp - 0xa3c], eax
mov dword [ebp - 0xa30], esi
je 0x1031cde
cmp dword [ebp - 0xa20], edi
jb 0x1031da1
add edi, eax
add dword [ebp - 0xa20], eax
jmp 0x1031c24
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xa1c]
push ecx
push eax
mov eax, dword [edx + 4]
add eax, dword [ebp - 0xa24]
lea ecx, [ebp - 0x408]
push eax
push ecx
mov ecx, dword [ebp - 0xa40]
call fcn.010317c0
mov esi, eax
test esi, esi
jne 0x1031d32
mov eax, dword [ebp - 0xa28]
mov edx, dword [ebp - 0xa1c]
add dword [ebp - 0xa24], 0x802
add eax, 1
cmp eax, dword [edx]
mov dword [ebp - 0xa28], eax
jb 0x1031c00
xor ebx, ebx
mov eax, dword [ebp - 0xa30]
cmp eax, ebx
je 0x1031d45
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0xa34]
cmp eax, ebx
je 0x1031d56
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0xa1c]
cmp edi, ebx
je 0x1031d79
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x1031d70
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0xa38]
cmp eax, ebx
je 0x1031d8c
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.01029f27
mov esp, ebp
pop ebp
ret 4
mov esi, 0x139f
xor ebx, ebx
jmp 0x1031d45