Function at 0x408a6c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1f4
mov eax, dword [0x450074]
xor eax, esp
mov dword [esp + 0x1f0], eax
xor eax, eax
mov dword [esp + 0x58], ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea ecx, [esp + 0x2c]
mov ebx, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
call fcn.00409095
xor eax, eax
mov dword [esp + 0x1d8], 0x1000200
push 0x118
push eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1fe], eax
mov word [esp + 0x202], ax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], eax
lea eax, [esp + 0xc4]
push eax
mov dword [esp + 0x1e8], 0x5020001
mov dword [esp + 0x1ec], 0x10300
mov dword [esp + 0x1f0], 0x6000204
mov dword [esp + 0x1f4], 0x7080001
mov dword [esp + 0x1f8], 0x30900
mov dword [esp + 0x1fc], 0xc00010a
mov word [esp + 0x200], 7
call sub.msvcrt.dll_memset
and dword [esp + 0x48], 0
lea eax, [esp + 0xc4]
add esp, 0xc
mov dword [esp + 0xb8], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x408b8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.0040a474
mov esi, eax
jmp 0x408f85
push dword [esp + 0xc8]
lea eax, [esp + 0x30]
push dword [esp + 0xc4]
push dword [esp + 0xc4]
push 0x4040c0
push eax
call fcn.00409aac
mov esi, eax
add esp, 0x14
test esi, esi
js 0x408f85
mov eax, dword fs:[0x30]
movzx eax, byte [eax + 3]
shr eax, 1
and eax, 1
push eax
lea eax, [esp + 0x30]
push 0x40412c
push eax
call fcn.00409aac
mov esi, eax
add esp, 0xc
test esi, esi
js 0x408f85
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SLC.dll_SLOpen]
mov esi, eax
test esi, esi
js 0x408f85
push ecx
push ecx
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00445347
mov esi, eax
test esi, esi
js 0x408f85
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x30]
lea edx, [esp + 0x1e4]
push ecx
call fcn.004452c2
mov esi, eax
test esi, esi
js 0x408f85
mov edx, dword [esp + 0x54]
lea eax, [esp + 0x50]
push eax
push ecx
mov ecx, dword [esp + 0x28]
call fcn.004099fd
mov esi, eax
test esi, esi
js 0x408f85
push dword [esp + 0x50]
lea eax, [esp + 0x30]
push 0x40413c
push eax
call fcn.00409aac
mov esi, eax
add esp, 0xc
test esi, esi
js 0x408f85
lea ecx, [esp + 0x90]
call fcn.0044ad26
mov esi, eax
test esi, esi
js 0x408f85
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x58]
push eax
push 0x404938
lea edx, [esp + 0x98]
call fcn.004092e6
mov esi, eax
test esi, esi
js 0x408f85
cmp dword [esp + 0x58], 0
je 0x408e65
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push 0
push dword [esp + 0xa8]
lea edx, [esp + 0x80]
lea ecx, [esp + 0x78]
call fcn.00409ce6
mov esi, eax
test esi, esi
js 0x408f85
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x408b7b
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x80]
call fcn.00409de2
mov esi, eax
test esi, esi
js 0x408f85
push dword [esp + 0x3c]
push 0x404150
lea eax, [esp + 0x34]
push eax
call fcn.00409aac
mov esi, eax
add esp, 0xc
test esi, esi
js 0x408f85
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x64]
push eax
push 0x404178
push dword [esp + 0x20]
call dword [sym.imp.SLC.dll_SLGetServiceInformation]
xor ebx, ebx
inc ebx
test eax, eax
js 0x408d91
cmp dword [esp + 0x5c], ebx
jne 0x408d91
push dword [esp + 0x18]
lea eax, [esp + 0x30]
push 0x404198
push eax
call fcn.00409aac
mov esi, eax
add esp, 0xc
test esi, esi
js 0x408f85
lea eax, [esp + 0x60]
push eax
push 0x4041d0
call dword [sym.imp.SLC.dll_SLGetWindowsInformationDWORD]
mov esi, eax
test esi, esi
js 0x408f85
push dword [esp + 0x60]
lea eax, [esp + 0x30]
push 0x404210
push eax
call fcn.00409aac
mov esi, eax
add esp, 0xc
test esi, esi
js 0x408f85
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [eax*2 + 2]
call fcn.004099fd
mov esi, eax
test esi, esi
js 0x408f85
push dword [esp + 0x1c]
lea eax, [esp + 0x50]
push 0x404244
push eax
call fcn.0040882b
mov esi, eax
add esp, 0xc
test esi, esi
js 0x408f85
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x3c]
push eax
push 0
push dword [esp + 0x58]
push 0x404994
call dword [sym.imp.SLC.dll_SLGetGenuineInformation]
test eax, eax
jns 0x408f28
mov esi, 0x450424
test byte [0x4080ea], bl
je 0x408ec6
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x450090]
test eax, eax
jne 0x408eb4
push eax
call fcn.00443ebb
test eax, eax
js 0x408ebf
mov dword [0x450090], ebx
jmp 0x408ebf
lea eax, [esp + 0x40]
push eax
push ecx
push ecx
push ebx
push ecx
call fcn.0044b7f6
mov esi, eax
test esi, esi
jns 0x408e80
mov ecx, esi
call fcn.0040a491
mov ecx, esi
call fcn.0040a4ae
test esi, esi
js 0x408f85
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x44]
call fcn.0040a423
mov esi, eax
test esi, esi
js 0x408f85
push dword [esp + 0x44]
push 0x404168
jmp 0x408d2f
cmp eax, 0xffffffff
je 0x408ebf
inc eax
mov dword [0x450090], eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040935f
mov esi, eax
test esi, esi
js 0x408f85
test byte [0x4080ea], bl
je 0x408f28
push 0x450424
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x450090]
cmp eax, ebx
jne 0x408f0e
push ebx
call fcn.00443ebb
and dword [0x450090], 0
jmp 0x408f1d
cmp eax, 0xffffffff
je 0x408f1d
test eax, eax
je 0x408f1d
dec eax
mov dword [0x450090], eax
push 0x450424
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x38], ebx
jbe 0x408f8c
mov eax, dword [esp + 0x64]
lea edx, [esp + 0x24]
test eax, eax
je 0x409086
mov ecx, eax
call fcn.0040a423
mov esi, eax
test esi, esi
js 0x408f85
test edi, edi
jne 0x408f54
mov edi, 0x404274
lea eax, [esp + 0x48]
mov edx, edi
push eax
push ecx
mov ecx, dword [esp + 0x2c]
call fcn.00409f7c
mov esi, eax
test esi, esi
js 0x408f85
mov edx, dword [esp + 0x38]
push dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
lea edx, [edx - 1]
call fcn.00409e2b
mov esi, eax
test esi, esi
jns 0x408f8c
mov ecx, esi
call fcn.0040a491
mov ecx, esi
call fcn.0040a4ae
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x408fa0
call fcn.0040a324
lea ecx, [esp + 0x40]
call fcn.00409095
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x408fb6
call fcn.0040a324
cmp dword [esp + 0x18], 0
je 0x408fd5
push dword [esp + 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [esp + 0x18], 0
cmp dword [esp + 0x10], 0
je 0x408feb
push dword [esp + 0x10]
call dword [sym.imp.SLC.dll_SLClose]
and dword [esp + 0x10], 0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x408ff8
call fcn.0040a324
lea ecx, [esp + 0x2c]
call fcn.00409095
cmp dword [esp + 0x20], 0
je 0x409012
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x40901f
call fcn.0040a324
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x40902c
call fcn.0040a324
cmp dword [esp + 0x14], 0
je 0x409042
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [esp + 0x14], 0
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x40904f
call fcn.0040a324
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x40905c
call fcn.0040a324
cmp dword [esp + 0x28], 0
je 0x40906d
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x1fc]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0044ce60
mov esp, ebp
pop ebp
ret 4
call fcn.0040a02a
jmp 0x408f45