Function at 0x405e00
Capabilities:
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x410866
push eax
mov eax, 0x133c
mov dword fs:[0], esp
call fcn.00409b70
push ebp
push esi
mov esi, 0x104
push edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
call fcn.00402c40
lea ecx, [esp + 0xc]
mov dword [esp + 0x1350], 0
call fcn.00402c40
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x28]
mov ebp, dword [esp + 0x1358]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x238]
push esi
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x134]
mov byte [esp + 0x1354], 1
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0x23c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x238]
push 0x5c
push ecx
call fcn.00409ba0
mov edx, 2
lea ecx, [esp + 0x240]
sub edx, ecx
add esp, 8
add eax, edx
lea edx, [esp + 0x238]
push eax
lea eax, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0
lea ecx, [esp + 0x10]
call fcn.00402c50
test eax, eax
je 0x406208
mov ecx, dword [esp + 0x18]
xor eax, eax
mov edx, ecx
lea edi, [esp + 0x340]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push 0
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov edx, ecx
lea edi, [esp + 0x64c]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push 0
rep stosb byte es:[edi], al
lea eax, [esp + 0x24]
push 0
lea ecx, [esp + 0x658]
push eax
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x35c]
push edx
push eax
lea ecx, [esp + 0x30]
call fcn.00402d40
mov edx, eax
test edx, edx
je 0x406208
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x130]
lea ebp, [esp + 0x130]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea edi, [esp + 0x340]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
lea ebp, [esp + 0x130]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._sqlsunin.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebp
mov ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [esp + 0x1358]
and ecx, 3
test edx, edx
rep movsb byte es:[edi], byte [esi]
je 0x406208
lea ecx, [esp + 0x130]
lea edx, [esp + 0x1c]
push ecx
push 6
push edx
push 0x41358c
push str.SwitchTo
push str.Verswitch
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x405ffc
xor esi, esi
cmp byte [esp + 0x1c], 0x78
jne 0x406005
xor esi, esi
lea eax, [esp + 0x130]
push eax
push 0x3e7
push str.Upgrade
push str.Status
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, 1
je 0x406208
test esi, esi
je 0x406208
mov eax, dword [esp + 0x135c]
test eax, eax
jne 0x406208
mov esi, dword [esp + 0x1364]
test esi, esi
je 0x40620f
cmp esi, 0xbc2
je 0x40620f
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
lea ecx, [esp + 0x28]
sub ecx, 2
add eax, ecx
cmp eax, edx
mov ecx, eax
jbe 0x40608e
cmp byte [eax], 0x5c
je 0x40608e
dec eax
lea edx, [esp + 0x28]
cmp eax, edx
ja 0x406080
sub ecx, eax
lea edx, [eax + 1]
inc ecx
xor eax, eax
mov esi, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
push 1
and ecx, 3
rep stosb byte es:[edi], al
or ecx, 0xffffffff
mov edi, str.binn_
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov dword [esp + 0x28], eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x28]
dec edi
mov ecx, eax
lea edx, [esp + 0x74c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x100
lea edi, [esp + 0x74c]
rep stosd dword es:[edi], eax
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x74c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.scm.exe__Silent_1__Action_4__Service_SQLServerAgent
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
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
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x750]
push ecx
push 0
lea ecx, [esp + 0x20]
call fcn.004037f0
push 0
lea edx, [esp + 0x2c]
push 8
push edx
lea eax, [esp + 0x28]
lea ecx, [esp + 0x18]
push eax
push 0
call fcn.00403280
test eax, eax
je 0x406208
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x544]
push 0xff
push ecx
push 7
push ebp
call esi
lea edx, [esp + 0x1c]
lea eax, [esp + 0x544]
push edx
lea ecx, [esp + 0xb4c]
push eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x444]
push 0x100
push edx
push 9
push ebp
call esi
lea eax, [esp + 0x444]
push 0
lea ecx, [esp + 0xb4c]
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0xc]
mov byte [esp + 0x1350], 0
call fcn.00403970
lea ecx, [esp + 0x10]
mov dword [esp + 0x1350], 0xffffffff
call fcn.00403970
or eax, 0xffffffff
jmp 0x406236
mov esi, dword [esp + 0x1364]
lea ecx, [esp + 0xc]
mov byte [esp + 0x1350], 0
call fcn.00403970
lea ecx, [esp + 0x10]
mov dword [esp + 0x1350], 0xffffffff
call fcn.00403970
mov eax, esi
mov ecx, dword [esp + 0x1348]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1348
ret