Function at 0x40f350
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x477c60
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a5eb0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [0x4a643c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a643c
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [0x4a643c]
mov edx, dword [eax + 0xc]
xor ebx, ebx
mov ecx, 0x4a643c
mov dword [esp + 0x30], ebx
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
mov byte [esp + 0x3c], 1
mov dword [esp + 0x28], ebx
call fcn.0040e2a0
mov edi, eax
add esp, 0xc
cmp edi, ebx
jne 0x40f64d
mov esi, dword [esp + 0x1c]
cmp esi, ebx
jle 0x40f64d
push esi
mov edi, esi
push 4
mov dword [esp + 0x2c], edi
call dword [sym.imp.MSVCR90.dll_calloc]
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x40f535
lea ecx, [esp + 0x1c]
push ecx
push esi
push ebp
call fcn.0040e2a0
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x40f43a
push ebp
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
lea ecx, [esp + 0x14]
call fcn.004023d0
lea ecx, [esp + 0x18]
call fcn.004023d0
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test edi, edi
jle 0x40f535
mov eax, dword [str.Model_Name]
mov edi, dword [ebp + ebx*4]
lea edx, [esp + 0x18]
push edx
push eax
push edi
call fcn.0040ee00
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40f59b
mov edx, dword [str.DEVICEKEY]
lea ecx, [esp + 0x14]
push ecx
push edx
push edi
call fcn.0040ee00
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40f59b
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0040f0c0
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x40], 2
call fcn.0040f0c0
add esp, 0x10
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 3
call fcn.00404450
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x30], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f4dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x38]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404090
test eax, eax
jne 0x40f505
mov edx, dword [esp + 0x1c]
push edx
lea ecx, [esp + 0x18]
call fcn.00404090
test eax, eax
je 0x40f608
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f52a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc ebx
cmp ebx, dword [esp + 0x24]
jl 0x40f442
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f55a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f582
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 2
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push ebp
call dword [sym.imp.MSVCR90.dll_free]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f5ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f5f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov ecx, dword [ebp + ebx*4]
mov edx, dword [esp + 0x40]
push ebp
mov dword [edx], ecx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.004023d0
lea ecx, [esp + 0x14]
call fcn.004023d0
lea ecx, [esp + 0x18]
call fcn.004023d0
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
lea eax, [ebp - 0x10]
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f66e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f696
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret