Function at 0x409640
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 0x475e78
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x4a4eb0]
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 [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
lea ebx, [esi + 0xc]
call edx
add eax, 0x10
mov dword [ebx], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov dword [ebp - 4], 0
call edx
add eax, 0x10
mov dword [esi + 0x10], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 1
call edx
add eax, 0x10
mov dword [esi + 0x14], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
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 [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 4
call edx
add eax, 0x10
mov dword [esi + 0x24], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 5
call edx
add eax, 0x10
mov dword [esi + 0x28], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 6
call edx
add eax, 0x10
mov dword [esi + 0x2c], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 7
call edx
add eax, 0x10
mov dword [esi + 0x30], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 8
call edx
add eax, 0x10
mov dword [esi + 0x34], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 9
call edx
add eax, 0x10
mov dword [esi + 0x3c], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0xa
call edx
add eax, 0x10
mov dword [esi + 0x40], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0xb
call edx
add eax, 0x10
mov dword [esi + 0x44], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0xc
call edx
add eax, 0x10
mov dword [esi + 0x48], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0xd
call edx
add eax, 0x10
mov dword [esi + 0x50], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0xe
call edx
add eax, 0x10
mov dword [esi + 0x54], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0xf
call edx
add eax, 0x10
mov dword [esi + 0x58], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x10
call edx
add eax, 0x10
mov dword [esi + 0x5c], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x11
call edx
add eax, 0x10
mov dword [esi + 0x60], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x12
call edx
add eax, 0x10
mov dword [esi + 0x64], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x13
call edx
add eax, 0x10
mov dword [esi + 0x68], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x14
call edx
add eax, 0x10
mov dword [esi + 0x6c], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x15
call edx
add eax, 0x10
mov dword [esi + 0x70], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x16
call edx
add eax, 0x10
mov dword [esi + 0x74], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x17
call edx
add eax, 0x10
mov dword [esi + 0x78], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x18
call edx
add eax, 0x10
mov dword [esi + 0x7c], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x19
call edx
add eax, 0x10
mov dword [esi + 0x80], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
mov byte [ebp - 4], 0x1a
call edx
add eax, 0x10
mov dword [esi + 0x84], eax
mov eax, dword [0x4a540c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a540c
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 0x47fa00
mov dword [esi + 8], eax
xor eax, eax
push 0x17
push eax
push 0x4802f8
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 [0x47f57c]
mov dword [ebp - 0x18], eax
test eax, eax
jl 0x4099cf
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x47f578]
mov dword [ebp - 0x18], eax
test eax, eax
jl 0x4099a8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push 0x47ff60
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 0x4099d1
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0x1e
test eax, eax
jne 0x4099eb
push 0x80004003
call fcn.00465c30
mov ecx, eax
xor eax, eax
mov dword [ebp - 0x14], eax
test ecx, ecx
jge 0x4099bd
cmp ecx, 0x80004002
je 0x4099bd
mov eax, dword [ebp - 0x18]
push eax
call fcn.00465c30
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
add eax, 0x24
mov dword [ebp - 0x28], eax
call dword [0x47f158]
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 0x409a19
push 0x80004003
call fcn.00465c30
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
test eax, eax
je 0x409a2a
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 [0x47f158]
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 0x409a66
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 0x409a76
push 0x80004003
call fcn.00465c30
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 0x409a99
push 0x80004003
call fcn.00465c30
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 0x409ad8
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp + 8], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409ab4
sub eax, dword [ebp + 8]
lea ecx, [esi + 0x14]
sar eax, 1
push eax
push edx
call fcn.00402880
mov edx, dword [ebp - 0x20]
push edx
call dword [0x47f47c]
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push 0x4803f8
call fcn.004062c0
lea eax, [ebp + 8]
push eax
mov ecx, esi
call fcn.00408fe0
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 0x409b22
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 0x4803e4
call fcn.004062c0
lea ecx, [ebp + 8]
push ecx
mov ecx, esi
call fcn.00408fe0
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 0x409b6d
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.00401530
add eax, 0x10
add esp, 4
mov dword [ebx], eax
mov byte [ebp - 4], 0x21
call fcn.0041afb0
lea ecx, [ebp + 8]
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x1e
call fcn.00418260
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 0x409bd1
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 0x409be1
push 0x80004003
call fcn.00465c30
push str.COMPOSITEID
lea ecx, [ebp - 0x28]
call fcn.00406690
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 [0x47f438]
test eax, eax
jne 0x409c0b
call fcn.00401460
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test ecx, ecx
je 0x409c18
mov ecx, dword [ecx]
jmp 0x409c1a
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 0x409c67
lea ecx, [edi + 8]
push ecx
call dword [0x47f1f8]
test eax, eax
jne 0x409c67
test edi, edi
je 0x409c67
mov eax, dword [edi]
test eax, eax
je 0x409c4e
push eax
call dword [0x47f47c]
mov eax, dword [edi + 4]
test eax, eax
je 0x409c5e
push eax
call fcn.004746d4
add esp, 4
push edi
call fcn.004746d4
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.00401530
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [ebp - 4], 0x24
call fcn.0041afb0
mov ecx, eax
mov byte [ebp - 4], 0x1e
call fcn.00418450
mov dword [esi + 0x8c], eax
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0x1d
test eax, eax
je 0x409cfc
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x409cfc
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