Function at 0x404610
Capabilities:
Get common file path
Read .ini file
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x529e8b
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x577da0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea esi, [ebp - 0x230]
call fcn.00404230
mov dword [ebp - 4], 0
mov ecx, dword [eax]
mov esi, dword [0x580d24]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x4046ac
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40469d
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40469d
push eax
call fcn.00402600
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x404692
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [0x580d24], ebx
jmp 0x4046ac
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, 0x580d24
call fcn.00402400
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4046d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov dword [ebp - 0x230], esp
mov ecx, esp
push 0x580d24
call fcn.00402670
call fcn.004044d0
add esp, 4
test eax, eax
jne 0x40485f
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x580a20
push 0xa
lea edx, [ebp - 0x24]
push edx
xor ecx, ecx
push ecx
push str.version
push str.version
mov word [ebp - 0x24], cx
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
call esi
mov ecx, 0x579438
lea eax, [ebp - 0x24]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40475a
test dx, dx
je 0x404756
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40475a
add eax, 4
add ecx, 4
test dx, dx
jne 0x404734
xor eax, eax
jmp 0x40475f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40485b
push 0x580a20
push 0x104
push 0x580408
push 0
push 0x55790c
push 0x55790c
call esi
lea esi, [ebp - 0x234]
call fcn.004045f0
mov esi, dword [eax]
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x22a]
push ecx
mov word [ebp - 0x22c], ax
call fcn.005069f0
add esp, 0xc
lea edx, [ebp - 0x22c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, esi
mov ecx, esi
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4047c5
lea edi, [ebp - 0x22c]
sub eax, ecx
add edi, 0xfffffffe
mov esi, ecx
lea edx, [edi + 2]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4047e0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
push 0x580818
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404828
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x104
push 0x580610
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00505281
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x40483f
push 0x20
push 0x557328
push 0x557914
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]