Function at 0x406b50
Capabilities:
Delete file
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x44448b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x104
push esi
push edi
mov edi, ecx
push str.UpdateVersion.ini
lea ecx, [esp + 0xc]
call fcn.00404280
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..UpdateVersion.ini
push 0xff
lea eax, [esp + 0x14]
push eax
push 0
push str.CheckVersion
push str.Version
mov dword [esp + 0x12c], 0
mov dword [edi + 0x870], 0
call esi
test eax, eax
je 0x406bcc
lea ecx, [esp + 0xc]
push ecx
call fcn.00420fe1
add esp, 4
mov dword [edi + 0x870], eax
push 0
push str.UpdateVersion_mjw_.ini
call fcn.004201e9
add esp, 8
test eax, eax
jne 0x406c12
push str..UpdateVersion_mjw_.ini
push 0xff
lea edx, [esp + 0x14]
push edx
push eax
push str.CheckVersion
push str.Version
call esi
test eax, eax
je 0x406c12
lea eax, [esp + 0xc]
push eax
call fcn.00420fe1
add esp, 4
mov dword [edi + 0x870], eax
push str..UpdateVersion.ini
push 0xff
lea ecx, [esp + 0x14]
push ecx
push 0
push str.UpdaterVersion
push str.Version
call esi
test eax, eax
jne 0x406c82
mov edx, dword [esp + 8]
mov edi, dword [edx - 4]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, edi
or ecx, eax
jge 0x406c57
push 0
lea ecx, [esp + 0xc]
call fcn.00402220
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 8]
add eax, 0xfffffff0
mov dword [esp + 0x114], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x406d47
lea eax, [esp + 0xc]
push eax
call fcn.00420fe1
push 0
push str.UpdateVersion_mjw_.ini
mov dword [edi + 0x5c], eax
call fcn.004201e9
add esp, 0xc
test eax, eax
jne 0x406cd2
push str..UpdateVersion_mjw_.ini
push 0xff
lea ecx, [esp + 0x14]
push ecx
push eax
push str.UpdaterVersion
push str.Version
call esi
test eax, eax
je 0x406cd2
lea edx, [esp + 0xc]
push edx
call fcn.00420fe1
add esp, 4
mov dword [edi + 0x5c], eax
cmp dword [edi + 0x5c], 0x14
jbe 0x406cdc
mov byte [edi + 0x25], 1
push str..UpdateVersion.ini
push 0xff
lea eax, [esp + 0x14]
push eax
push 0
push str.PatchFileVersion
push str.Version
call esi
test eax, eax
jne 0x406d6a
mov edx, dword [esp + 8]
mov edi, dword [edx - 4]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, edi
or ecx, eax
jge 0x406d21
push 0
lea ecx, [esp + 0xc]
call fcn.00402220
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 8]
add eax, 0xfffffff0
mov dword [esp + 0x114], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x104]
mov dword fs:[0], ecx
add esp, 0x110
ret
lea eax, [esp + 0xc]
push eax
call fcn.00420fe1
push 0
push str.UpdateVersion_mjw_.ini
mov dword [edi + 0x54], eax
call fcn.004201e9
add esp, 0xc
test eax, eax
jne 0x406dba
push str..UpdateVersion_mjw_.ini
push 0xff
lea ecx, [esp + 0x14]
push ecx
push eax
push str.PatchFileVersion
push str.Version
call esi
test eax, eax
je 0x406dba
lea edx, [esp + 0xc]
push edx
call fcn.00420fe1
add esp, 4
mov dword [edi + 0x54], eax
mov eax, dword [edi + 0x54]
cmp dword [edi + 0x50], eax
jbe 0x406dc8
mov dword [edi + 0x50], eax
mov dword [edi + 0x58], eax
mov edx, dword [esp + 8]
mov edi, dword [edx - 4]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, edi
or ecx, eax
jge 0x406dec
push 0
lea ecx, [esp + 0xc]
call fcn.00402220
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 8]
add eax, 0xfffffff0
mov dword [esp + 0x114], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e1c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x10c]
pop edi
mov al, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x110
ret