Function at 0x4057f0
Capabilities:
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x410216
push eax
mov eax, 0x133c
mov dword fs:[0], esp
call fcn.00409510
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.004025b0
lea ecx, [esp + 0xc]
mov dword [esp + 0x1350], 0
call fcn.004025b0
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.00409540
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.004025c0
test eax, eax
je 0x405c27
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.004026b0
mov edx, eax
test edx, edx
je 0x405c27
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 0x405c27
lea ecx, [esp + 0x130]
lea edx, [esp + 0x1c]
push ecx
push 6
push edx
push 0x4134c8
push str.SwitchTo
push str.Verswitch
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x4059ec
xor esi, esi
cmp byte [esp + 0x1c], 0x78
jne 0x4059f5
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 0x405c27
test esi, esi
je 0x405c27
mov eax, dword [esp + 0x135c]
test eax, eax
jne 0x405c27
mov esi, dword [esp + 0x1364]
test esi, esi
je 0x405c2e
cmp esi, 0xbc2
je 0x405c2e
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 0x405a7e
cmp byte [eax], 0x5c
je 0x405a7e
dec eax
lea edx, [esp + 0x28]
cmp eax, edx
ja 0x405a70
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
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 + 0x24], eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x24]
dec edi
mov ecx, eax
lea edx, [esp + 0x748]
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 + 0x748]
rep stosd dword es:[edi], eax
mov edi, 0x413078
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 + 0x748]
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]
lea edi, [esp + 0x28]
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 edx, [esp + 0x748]
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]
dec edi
mov ecx, edx
lea eax, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 1
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.00403160
push 0
lea edx, [esp + 0x2c]
push 8
lea eax, [esp + 0x24]
push edx
push eax
push 0
lea ecx, [esp + 0x20]
call fcn.00402bf0
test eax, eax
je 0x405c27
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.004032e0
lea ecx, [esp + 0x10]
mov dword [esp + 0x1350], 0xffffffff
call fcn.004032e0
or eax, 0xffffffff
jmp 0x405c55
mov esi, dword [esp + 0x1364]
lea ecx, [esp + 0xc]
mov byte [esp + 0x1350], 0
call fcn.004032e0
lea ecx, [esp + 0x10]
mov dword [esp + 0x1350], 0xffffffff
call fcn.004032e0
mov eax, esi
mov ecx, dword [esp + 0x1348]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1348
ret