Function at 0x4045d0
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x670
mov eax, dword [0x5b0050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0x64c], 0
mov dword [ebp - 0x670], 1
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x66c], 1
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0x20019
mov ecx, 0x16
mov esi, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
lea edi, [ebp - 0x61c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x1ae
push 0
lea eax, [ebp - 0x5c2]
push eax
call fcn.005341e0
add esp, 0xc
call fcn.00401bb0
mov dword [ebp - 0x64c], eax
cmp dword [ebp - 0x64c], 0
je 0x404671
mov ecx, dword [ebp - 0x644]
or ecx, 0x100
mov dword [ebp - 0x644], ecx
lea edx, [ebp - 0x638]
push edx
mov eax, dword [ebp - 0x644]
push eax
push 0
lea ecx, [ebp - 0x61c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404793
mov dword [ebp - 0x648], 0x104
push 0x208
push 0
lea edx, [ebp - 0x20c]
push edx
call fcn.005341e0
add esp, 0xc
lea eax, [ebp - 0x648]
push eax
mov ecx, 2
imul edx, ecx, 0
lea eax, [ebp + edx - 0x20c]
push eax
lea ecx, [ebp - 0x66c]
push ecx
push 0
push 0x58ef3c
mov edx, dword [ebp - 0x638]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x404786
mov dword [ebp - 0x634], 0
jmp 0x404710
mov eax, dword [ebp - 0x634]
add eax, 1
mov dword [ebp - 0x634], eax
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x628], ecx
mov edx, dword [ebp - 0x628]
add edx, 2
mov dword [ebp - 0x668], edx
mov eax, dword [ebp - 0x628]
mov cx, word [eax]
mov word [ebp - 0x63a], cx
add dword [ebp - 0x628], 2
cmp word [ebp - 0x63a], 0
jne 0x40472b
mov edx, dword [ebp - 0x628]
sub edx, dword [ebp - 0x668]
sar edx, 1
mov dword [ebp - 0x660], edx
mov eax, dword [ebp - 0x634]
cmp eax, dword [ebp - 0x660]
jae 0x404786
mov ecx, 0x2e
mov edx, dword [ebp - 0x634]
mov word [ebp + edx*2 - 0x20c], cx
jmp 0x404701
mov eax, dword [ebp - 0x638]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x62c], ecx
mov edx, dword [ebp - 0x62c]
add edx, 2
mov dword [ebp - 0x664], edx
mov eax, dword [ebp - 0x62c]
mov cx, word [eax]
mov word [ebp - 0x63e], cx
add dword [ebp - 0x62c], 2
cmp word [ebp - 0x63e], 0
jne 0x4047ae
mov edx, dword [ebp - 0x62c]
sub edx, dword [ebp - 0x664]
sar edx, 1
mov dword [ebp - 0x658], edx
mov eax, dword [ebp - 0x658]
add eax, 1
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00532d9e
add esp, 8
mov dword [ebp - 0x620], 0
jmp 0x404817
mov edx, dword [ebp - 0x620]
add edx, 1
mov dword [ebp - 0x620], edx
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x624], eax
mov ecx, dword [ebp - 0x624]
add ecx, 2
mov dword [ebp - 0x65c], ecx
mov edx, dword [ebp - 0x624]
mov ax, word [edx]
mov word [ebp - 0x63c], ax
add dword [ebp - 0x624], 2
cmp word [ebp - 0x63c], 0
jne 0x404832
mov ecx, dword [ebp - 0x624]
sub ecx, dword [ebp - 0x65c]
sar ecx, 1
mov dword [ebp - 0x650], ecx
mov edx, dword [ebp - 0x620]
cmp edx, dword [ebp - 0x650]
jae 0x4048a0
mov eax, dword [ebp - 0x620]
movzx ecx, word [ebp + eax*2 - 0x20c]
cmp ecx, 0x20
jne 0x40489b
mov edx, 0x2e
mov eax, dword [ebp - 0x620]
mov word [ebp + eax*2 - 0x20c], dx
jmp 0x404808
push str.server
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x404949
push str..2003
lea edx, [ebp - 0x20c]
push edx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x4048de
mov eax, 3
jmp 0x404aef
push str..2008
lea eax, [ebp - 0x20c]
push eax
call fcn.00408e00
add esp, 8
test eax, eax
je 0x404900
mov eax, 5
jmp 0x404aef
push str..2012
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x404922
mov eax, 6
jmp 0x404aef
push str..2016
lea edx, [ebp - 0x20c]
push edx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x404944
mov eax, 8
jmp 0x404aef
jmp 0x404a15
push 0x58ef7c
lea eax, [ebp - 0x20c]
push eax
call fcn.00408e00
add esp, 8
test eax, eax
je 0x40496b
mov eax, 1
jmp 0x404aef
push str..vista
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x40498d
mov eax, 2
jmp 0x404aef
push 0x58ef94
lea edx, [ebp - 0x20c]
push edx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x4049af
mov eax, 4
jmp 0x404aef
push 0x58ef9c
lea eax, [ebp - 0x20c]
push eax
call fcn.00408e00
add esp, 8
test eax, eax
je 0x4049d1
mov eax, 7
jmp 0x404aef
push 0x58efa4
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x4049f3
mov eax, 9
jmp 0x404aef
push 0x58efac
lea edx, [ebp - 0x20c]
push edx
call fcn.00408e00
add esp, 8
test eax, eax
je 0x404a15
mov eax, 0xa
jmp 0x404aef
push 0x208
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.005341e0
add esp, 0xc
push 0x208
lea ecx, [ebp - 0x414]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
lea edx, [ebp - 0x414]
push edx
call fcn.00408e20
add esp, 8
mov ecx, 2
imul edx, ecx, 0
xor ecx, ecx
mov word [eax + edx], cx
push 0x58efb4
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x414]
push eax
push 0
push str.type
push 0x58efd8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x654], eax
mov ecx, dword [ebp - 0x654]
mov dword [ebp - 0x630], ecx
mov edx, dword [ebp - 0x630]
sub edx, 1
mov dword [ebp - 0x630], edx
cmp dword [ebp - 0x630], 6
ja case.default.0x404ab9
mov eax, dword [ebp - 0x630]
jmp dword [eax*4 + 0x404b00]
mov eax, 1
jmp 0x404aef
mov eax, 3
jmp 0x404aef
mov eax, 5
jmp 0x404aef
mov eax, 4
jmp 0x404aef
mov eax, 7
jmp 0x404aef
mov eax, 9
jmp 0x404aef
mov eax, 9
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00531c35
mov esp, ebp
pop ebp
ret