Function at 0x409660
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x475308
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x4a3eb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x24], esi
mov dword [esi], vtable.CDevice.0
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
lea ebx, [esi + 0xc]
call edx
add eax, 0x10
mov dword [ebx], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov dword [ebp - 4], 0
call edx
add eax, 0x10
mov dword [esi + 0x10], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 1
call edx
add eax, 0x10
mov dword [esi + 0x14], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 2
call edx
add eax, 0x10
mov dword [esi + 0x18], eax
lea edi, [esi + 0x20]
mov dword [edi], 0
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 4
call edx
add eax, 0x10
mov dword [esi + 0x24], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 5
call edx
add eax, 0x10
mov dword [esi + 0x28], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 6
call edx
add eax, 0x10
mov dword [esi + 0x2c], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 7
call edx
add eax, 0x10
mov dword [esi + 0x30], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 8
call edx
add eax, 0x10
mov dword [esi + 0x34], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 9
call edx
add eax, 0x10
mov dword [esi + 0x3c], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0xa
call edx
add eax, 0x10
mov dword [esi + 0x40], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0xb
call edx
add eax, 0x10
mov dword [esi + 0x44], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0xc
call edx
add eax, 0x10
mov dword [esi + 0x48], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0xd
call edx
add eax, 0x10
mov dword [esi + 0x50], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0xe
call edx
add eax, 0x10
mov dword [esi + 0x54], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0xf
call edx
add eax, 0x10
mov dword [esi + 0x58], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x10
call edx
add eax, 0x10
mov dword [esi + 0x5c], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x11
call edx
add eax, 0x10
mov dword [esi + 0x60], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x12
call edx
add eax, 0x10
mov dword [esi + 0x64], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x13
call edx
add eax, 0x10
mov dword [esi + 0x68], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x14
call edx
add eax, 0x10
mov dword [esi + 0x6c], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x15
call edx
add eax, 0x10
mov dword [esi + 0x70], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x16
call edx
add eax, 0x10
mov dword [esi + 0x74], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x17
call edx
add eax, 0x10
mov dword [esi + 0x78], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x18
call edx
add eax, 0x10
mov dword [esi + 0x7c], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x19
call edx
add eax, 0x10
mov dword [esi + 0x80], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x1a
call edx
add eax, 0x10
mov dword [esi + 0x84], eax
mov eax, dword [0x4a440c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a440c
mov byte [ebp - 4], 0x1b
call edx
add eax, 0x10
mov dword [esi + 0x88], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
push ecx
push 0x47ea00
mov dword [esi + 8], eax
xor eax, eax
push 0x17
push eax
push 0x47f2f8
mov dword [esi + 0x38], eax
mov dword [esi + 0x94], eax
mov dword [esi + 0x90], eax
mov byte [ebp - 4], 0x1d
mov dword [ebp - 0x14], eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x18], eax
test eax, eax
jl 0x4099ef
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ole32.dll_OleRun]
mov dword [ebp - 0x18], eax
test eax, eax
jl 0x4099c8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push 0x47ef60
push eax
mov eax, dword [ecx]
call eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jl 0x4099f1
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0x1e
test eax, eax
jne 0x409a0b
push 0x80004003
call fcn.004650f0
mov ecx, eax
xor eax, eax
mov dword [ebp - 0x14], eax
test ecx, ecx
jge 0x4099dd
cmp ecx, 0x80004002
je 0x4099dd
mov eax, dword [ebp - 0x18]
push eax
call fcn.004650f0
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
add eax, 0x24
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
push eax
mov eax, dword [edx]
push ecx
call eax
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x409a39
push 0x80004003
call fcn.004650f0
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
test eax, eax
je 0x409a4a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x18]
mov dword [edi], 0
mov ecx, dword [eax]
push edi
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x18]
push edx
mov edx, dword [ecx + 0x20]
push eax
call edx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x409a86
mov dword [ebp - 0x14], 0
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [edi]
test eax, eax
jne 0x409a96
push 0x80004003
call fcn.004650f0
mov ecx, dword [eax]
lea edx, [esi + 0x1c]
push edx
push eax
mov eax, dword [ecx + 0x44]
call eax
mov eax, dword [edi]
mov dword [ebp - 0x20], 0
test eax, eax
jne 0x409ab9
push 0x80004003
call fcn.004650f0
mov ecx, dword [eax]
lea edx, [ebp - 0x20]
push edx
push eax
mov eax, dword [ecx + 0x3c]
call eax
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x409af8
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp + 8], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409ad4
sub eax, dword [ebp + 8]
lea ecx, [esi + 0x14]
sar eax, 1
push eax
push edx
call fcn.00402860
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push 0x47f3f8
call fcn.004062c0
lea eax, [ebp + 8]
push eax
mov ecx, esi
call fcn.00409000
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x1f
call fcn.00404410
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0x1e
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409b42
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push 0x47f3e4
call fcn.004062c0
lea ecx, [ebp + 8]
push ecx
mov ecx, esi
call fcn.00409000
push eax
lea ecx, [esi + 0x10]
mov byte [ebp - 4], 0x20
call fcn.00404410
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0x1e
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409b8d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0x14]
push ecx
sub eax, 0x10
mov dword [ebp - 0x28], esp
mov ebx, esp
push eax
call fcn.00401510
add eax, 0x10
add esp, 4
mov dword [ebx], eax
mov byte [ebp - 4], 0x21
call fcn.0041b650
lea ecx, [ebp + 8]
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x1e
call fcn.00418990
lea ebx, [esi + 0x18]
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x22
call fcn.00404410
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0x1e
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409bf1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [edi]
test edi, edi
jne 0x409c01
push 0x80004003
call fcn.004650f0
push str.COMPOSITEID
lea ecx, [ebp - 0x28]
call fcn.004066b0
mov dword [ebp + 8], eax
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov byte [ebp - 4], 0x23
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x409c2b
call fcn.00401440
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test ecx, ecx
je 0x409c38
mov ecx, dword [ecx]
jmp 0x409c3a
xor ecx, ecx
mov edx, dword [edi]
push eax
mov eax, dword [edx + 0x6c]
push ecx
push edi
call eax
mov edi, dword [ebp - 0x28]
mov byte [ebp - 4], 0x1e
test edi, edi
je 0x409c87
lea ecx, [edi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x409c87
test edi, edi
je 0x409c87
mov eax, dword [edi]
test eax, eax
je 0x409c6e
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi + 4]
test eax, eax
je 0x409c7e
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esi + 0x14]
push ecx
sub eax, 0x10
mov dword [ebp + 8], esp
mov edi, esp
push eax
call fcn.00401510
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [ebp - 4], 0x24
call fcn.0041b650
mov ecx, eax
mov byte [ebp - 4], 0x1e
call fcn.00418b80
mov dword [esi + 0x8c], eax
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0x1d
test eax, eax
je 0x409d1c
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x409d1c
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4