Function at 0x412990
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4d24b8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x50397c]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov esi, ecx
xor ebp, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 0xa
mov dword [esp + 0x4c], ebp
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 0x28]
lea edx, [esp + 0x28]
push edx
call fcn.004124e0
mov eax, dword [0x50c48c]
mov edx, dword [eax + 0xc]
mov ebx, dword [esp + 0x2c]
add esp, 4
mov ecx, 0x50c48c
call edx
add eax, 0x10
mov dword [esp + 0x54], eax
cmp ebx, ebp
mov byte [esp + 0x4c], 1
jne 0x412a58
mov byte [esp + 0x4c], 0
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412a37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x28]
call fcn.00411130
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 4
xor ebp, ebp
xor eax, eax
cmp ebx, ebp
setne al
cmp eax, ebp
je 0x412bba
mov eax, ebx
mov edi, dword [eax + 8]
mov ecx, dword [edi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
mov ebx, dword [ebx]
sub edi, 0x10
call edx
cmp dword [edi + 0xc], ebp
lea ecx, [edi + 0xc]
jl 0x412a94
cmp eax, dword [edi]
jne 0x412a94
mov ebp, edi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x412acf
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
je 0x412bc4
mov eax, dword [edi + 4]
mov dword [ebp + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [ebp + 0x10]
push eax
call fcn.004a94d9
add esp, 0x10
lea edi, [ebp + 0x10]
mov dword [esp + 0x18], edi
mov byte [esp + 0x4c], 2
mov ecx, dword [esp + 0x54]
cmp dword [ecx - 0xc], 0
jne 0x412af1
mov eax, dword [edi - 0xc]
push eax
push edi
lea edx, [esp + 0x5c]
push edx
jmp 0x412b0c
push 1
push 0x4e3584
lea eax, [esp + 0x5c]
push eax
call fcn.004092d0
mov eax, dword [edi - 0xc]
push eax
push edi
lea ecx, [esp + 0x5c]
push ecx
call fcn.004092d0
push 2
push 0x4e374c
lea edx, [esp + 0x20]
push edx
call fcn.004092d0
mov ebp, dword [esp + 0x18]
mov edi, dword [ebp - 0xc]
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004a895b
add esp, 4
push edi
push eax
mov eax, ebp
lea edi, [esp + 0x24]
call fcn.00476d80
mov edi, dword [esi + 4]
add esp, 8
cmp edi, dword [esi + 8]
jb 0x412b68
lea eax, [edi + 1]
call fcn.00416780
test al, al
je 0x412bc9
mov ecx, dword [esi]
lea eax, [edi + edi*2]
lea eax, [ecx + eax*4]
test eax, eax
je 0x412b88
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [eax], edx
mov edx, dword [esp + 0x24]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
add dword [esi + 4], 1
lea eax, [ebp - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412bad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
jne 0x412a56
jmp 0x412a12
push 0x80004005
call fcn.00402940
call fcn.00402ad0
push 0x8007000e
call fcn.00402940
int3