Function at 0x496c40
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ce578
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x50ac94]
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 0x496e5d
cmp dword [ebx + 0x34], 0
jne 0x496ca5
mov dword [ebp - 0x18], esi
jmp 0x496cb6
mov di, word [ebx + 8]
mov ecx, edx
call fcn.00496770
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
cmp dword [ebx + 0x34], 0
jne 0x496cc0
mov eax, esi
jmp 0x496cce
mov di, word [ebx + 8]
mov ecx, edx
call fcn.00496770
mov edx, dword [ebp - 0x10]
xor ecx, ecx
cmp ecx, dword [ebx + 0x2c]
jb 0x496cf2
ja 0x496cdc
cmp eax, dword [ebx + 0x28]
jb 0x496cf2
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 0x496e5d
mov dword [ebp - 0x14], eax
jmp 0x496d13
mov edx, dword [ebp - 0x10]
cmp dword [ebx + 0x34], 0
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
jne 0x496d22
mov ecx, esi
jmp 0x496d53
movzx edi, word [ebx + 8]
mov eax, edx
xor edx, edx
xor ecx, ecx
cmp dx, di
jae 0x496d4d
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x496d44
mov ebx, dword [eax + 8]
add ebx, edx
cmp esi, ebx
mov ebx, dword [ebp + 8]
jb 0x496d6f
inc ecx
add eax, 0x28
cmp cx, di
jb 0x496d31
or ecx, 0xffffffff
mov edx, dword [ebp - 0x10]
xor eax, eax
cmp eax, dword [ebx + 0x2c]
ja 0x496cdc
jb 0x496d65
cmp ecx, dword [ebx + 0x28]
jae 0x496cdc
cmp dword [ebx + 0x34], 0
jne 0x496d78
mov ecx, esi
jmp 0x496da6
mov ecx, dword [eax + 0x14]
sub ecx, edx
add ecx, esi
jmp 0x496d50
movzx edi, word [ebx + 8]
mov eax, edx
xor edx, edx
xor ecx, ecx
cmp dx, di
jae 0x496da3
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x496d9a
mov ebx, dword [eax + 8]
add ebx, edx
cmp esi, ebx
mov ebx, dword [ebp + 8]
jb 0x496dc9
inc ecx
add eax, 0x28
cmp cx, di
jb 0x496d87
or ecx, 0xffffffff
mov eax, dword [ebx + 0x30]
add eax, ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.0047ea90
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x496dd2
xor ecx, ecx
jmp 0x496dda
mov ecx, dword [eax + 0x14]
sub ecx, edx
add ecx, esi
jmp 0x496da6
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 0x496e0b
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.00424cb8
add esp, 0x14
add esi, 4
mov dword [edi + 0x10], esi
jmp 0x496e27
cmp eax, esi
jbe 0x496e14
call fcn.004ae7f1
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.00423ea6
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 0x496e51
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 0x496d10
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