Function at 0x4047c0
Capabilities:
Access peb ldr_data
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x43891c
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44aaf0]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x30]
lea esi, [ebx + 4]
push 0x43f1c0
mov ecx, esi
mov dword [ebx], vtable.CDBUpgrade.0
call fcn.00403ce0
lea ebp, [ebx + 8]
push 0x43f1c0
mov ecx, ebp
mov dword [esp + 0x2c], 0
call fcn.00403ce0
mov byte [esp + 0x28], 1
lea edi, [ebx + 0xc]
call fcn.00412a2b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404839
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [edi], eax
add ebx, 0x10
push 0x43f1c0
mov ecx, ebx
mov byte [esp + 0x2c], 2
call fcn.00403ce0
mov byte [esp + 0x28], 3
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x18]
push edx
mov dword [ecx + 0x14], 0
call fcn.0040f9c0
push str.TempUpgradeUpgradeFilesName.INI
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x38], 4
call fcn.004039e0
add esp, 0x10
mov byte [esp + 0x28], 6
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esi]
sub eax, 0x10
mov dword [esp + 0x1c], ecx
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0x104
or eax, ecx
jge 0x4048df
push 0x104
mov ecx, esi
call fcn.004021f0
mov edx, dword [esp + 0x1c]
mov esi, dword [esi]
push edx
push 0x104
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x43f1c0
push str.Version
push str.PREVIOUS_DB_VERSION
call esi
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0x104
or eax, ecx
jge 0x404931
push 0x104
mov ecx, ebp
call fcn.004021f0
mov ecx, dword [esp + 0x1c]
mov ebp, dword [ebp]
push ecx
push 0x104
push ebp
push 0x43f1c0
push str.Version
push str.CURRENT_DB_VERSION
call esi
mov eax, dword [edi]
mov ebp, dword [esp + 0x14]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0x104
or eax, ecx
jge 0x404979
push 0x104
mov ecx, edi
call fcn.004021f0
mov edi, dword [edi]
push ebp
push 0x104
push edi
push 0x43f1c0
push str.Version
push str.PREVIOUS_SYSTEM_VERSION
call esi
mov eax, dword [ebx]
mov edi, dword [esp + 0x14]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0x104
or eax, ecx
jge 0x4049bc
push 0x104
mov ecx, ebx
call fcn.004021f0
mov ebx, dword [ebx]
push edi
push 0x104
push ebx
push 0x43f1c0
push str.Version
push str.CURRENT_SYSTEM_VERSION
call esi
mov edx, dword [esp + 0x14]
push edx
push 0
push str.IsUpdateAll
push str.UpgradeAll
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, 1
jne 0x4049fd
mov eax, dword [esp + 0x30]
mov dword [eax + 0x14], 1
mov byte [esp + 0x28], 3
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a22
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 4