Function at 0x4947a0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cb958
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x504c94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x1c]
mov edi, dword [ebx + 0xc]
mov esi, dword [eax + 8]
mov ecx, dword [ebx + 0x30]
mov eax, dword [eax + 0xc]
neg edx
sbb edx, edx
and edx, 0x10
add edx, 0xf8
add edx, dword [edi + 0x3c]
add edx, ecx
mov dword [ebp - 0x10], edx
test eax, eax
je 0x4949bd
cmp dword [ebx + 0x34], 0
jne 0x494805
mov dword [ebp - 0x18], esi
jmp 0x494816
mov di, word [ebx + 8]
mov ecx, edx
call fcn.004942f0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
cmp dword [ebx + 0x34], 0
jne 0x494820
mov eax, esi
jmp 0x49482e
mov di, word [ebx + 8]
mov ecx, edx
call fcn.004942f0
mov edx, dword [ebp - 0x10]
xor ecx, ecx
cmp ecx, dword [ebx + 0x2c]
jb 0x494852
ja 0x49483c
cmp eax, dword [ebx + 0x28]
jb 0x494852
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebp - 0x18]
cmp dword [eax + ecx + 0xc], 0
lea eax, [eax + ecx + 0xc]
je 0x4949bd
mov dword [ebp - 0x14], eax
jmp 0x494873
mov edx, dword [ebp - 0x10]
cmp dword [ebx + 0x34], 0
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
jne 0x494882
mov ecx, esi
jmp 0x4948b3
movzx edi, word [ebx + 8]
mov eax, edx
xor edx, edx
xor ecx, ecx
cmp dx, di
jae 0x4948ad
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x4948a4
mov ebx, dword [eax + 8]
add ebx, edx
cmp esi, ebx
mov ebx, dword [ebp + 8]
jb 0x4948cf
inc ecx
add eax, 0x28
cmp cx, di
jb 0x494891
or ecx, 0xffffffff
mov edx, dword [ebp - 0x10]
xor eax, eax
cmp eax, dword [ebx + 0x2c]
ja 0x49483c
jb 0x4948c5
cmp ecx, dword [ebx + 0x28]
jae 0x49483c
cmp dword [ebx + 0x34], 0
jne 0x4948d8
mov ecx, esi
jmp 0x494906
mov ecx, dword [eax + 0x14]
sub ecx, edx
add ecx, esi
jmp 0x4948b0
movzx edi, word [ebx + 8]
mov eax, edx
xor edx, edx
xor ecx, ecx
cmp dx, di
jae 0x494903
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x4948fa
mov ebx, dword [eax + 8]
add ebx, edx
cmp esi, ebx
mov ebx, dword [ebp + 8]
jb 0x494929
inc ecx
add eax, 0x28
cmp cx, di
jb 0x4948e7
or ecx, 0xffffffff
mov eax, dword [ebx + 0x30]
add eax, ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.0047bd90
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x494932
xor ecx, ecx
jmp 0x49493a
mov ecx, dword [eax + 0x14]
sub ecx, edx
add ecx, esi
jmp 0x494906
mov ecx, dword [edi + 0x14]
sub ecx, eax
sar ecx, 2
mov esi, dword [edi + 0x10]
mov edx, esi
sub edx, eax
sar edx, 2
cmp edx, ecx
jae 0x49496b
mov ecx, dword [ebp + 8]
mov byte [ebp - 0x1c], 0
mov eax, dword [ebp - 0x1c]
push eax
push ecx
lea edx, [ebp - 0x18]
push edx
push 1
push esi
call fcn.0042a134
add esp, 0x14
add esi, 4
mov dword [edi + 0x10], esi
jmp 0x494987
cmp eax, esi
jbe 0x494974
call fcn.004aba61
mov eax, dword [edi]
push esi
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x24]
push ecx
mov eax, edi
call fcn.00429e4a
add dword [ebp - 0x14], 0x14
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4949b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x14]
cmp dword [ecx], 0
jne 0x494870
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8