Function at 0x404670
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x584a3d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x60e9b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push dword [ebx + 0x30]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4048d3
push dword [ebx + 0x30]
push 1
push str.Activate
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4048d3
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x4046e4
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
mov ecx, ebx
call fcn.00404990
mov esi, eax
mov byte [ebp - 4], 1
call fcn.00402f30
push dword [esi]
push dword [eax + 0x9c]
lea eax, [ebp - 0x10]
push 0x5e8de4
push eax
call fcn.00406550
mov byte [ebp - 4], 0
or edi, 0xffffffff
mov edx, dword [ebp - 0x18]
add esp, 0x10
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404746
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x5e8df0
lea ecx, [ebp - 0x18]
call fcn.004078d0
mov byte [ebp - 4], 2
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x40476c
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 3
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x404790
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x24]
call fcn.00402b30
add esp, 0xc
mov byte [ebp - 4], 6
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4047d4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4047f2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404810
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub esp, 8
lea eax, [ebp - 0x24]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.00405990
mov byte [ebp - 4], 9
mov eax, dword [0x615f40]
mov esi, dword [ebx + 0x2c]
test eax, eax
jne 0x404852
push 0x7c
call fcn.0055602b
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, eax
mov byte [ebp - 4], 0xa
call fcn.004255a0
mov byte [ebp - 4], 9
mov dword [0x615f40], eax
push 0
push ebx
push esi
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.00425890
test eax, eax
je 0x40486c
mov ebx, 1
jmp 0x404876
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor ebx, ebx
mov byte [ebp - 4], 0xb
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x4048a0
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x4048a0
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x4048a0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x4048bf
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret