Function at 0x497f40
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cf898
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x50cc94]
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 0x49815d
cmp dword [ebx + 0x34], 0
jne 0x497fa5
mov dword [ebp - 0x18], esi
jmp 0x497fb6
mov di, word [ebx + 8]
mov ecx, edx
call fcn.00497a70
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
cmp dword [ebx + 0x34], 0
jne 0x497fc0
mov eax, esi
jmp 0x497fce
mov di, word [ebx + 8]
mov ecx, edx
call fcn.00497a70
mov edx, dword [ebp - 0x10]
xor ecx, ecx
cmp ecx, dword [ebx + 0x2c]
jb 0x497ff2
ja 0x497fdc
cmp eax, dword [ebx + 0x28]
jb 0x497ff2
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 0x49815d
mov dword [ebp - 0x14], eax
jmp 0x498013
mov edx, dword [ebp - 0x10]
cmp dword [ebx + 0x34], 0
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
jne 0x498022
mov ecx, esi
jmp 0x498053
movzx edi, word [ebx + 8]
mov eax, edx
xor edx, edx
xor ecx, ecx
cmp dx, di
jae 0x49804d
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x498044
mov ebx, dword [eax + 8]
add ebx, edx
cmp esi, ebx
mov ebx, dword [ebp + 8]
jb 0x49806f
inc ecx
add eax, 0x28
cmp cx, di
jb 0x498031
or ecx, 0xffffffff
mov edx, dword [ebp - 0x10]
xor eax, eax
cmp eax, dword [ebx + 0x2c]
ja 0x497fdc
jb 0x498065
cmp ecx, dword [ebx + 0x28]
jae 0x497fdc
cmp dword [ebx + 0x34], 0
jne 0x498078
mov ecx, esi
jmp 0x4980a6
mov ecx, dword [eax + 0x14]
sub ecx, edx
add ecx, esi
jmp 0x498050
movzx edi, word [ebx + 8]
mov eax, edx
xor edx, edx
xor ecx, ecx
cmp dx, di
jae 0x4980a3
mov edx, dword [eax + 0xc]
cmp esi, edx
jb 0x49809a
mov ebx, dword [eax + 8]
add ebx, edx
cmp esi, ebx
mov ebx, dword [ebp + 8]
jb 0x4980c9
inc ecx
add eax, 0x28
cmp cx, di
jb 0x498087
or ecx, 0xffffffff
mov eax, dword [ebx + 0x30]
add eax, ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.0047fdc0
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x4980d2
xor ecx, ecx
jmp 0x4980da
mov ecx, dword [eax + 0x14]
sub ecx, edx
add ecx, esi
jmp 0x4980a6
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 0x49810b
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.00424d03
add esp, 0x14
add esi, 4
mov dword [edi + 0x10], esi
jmp 0x498127
cmp eax, esi
jbe 0x498114
call fcn.004afaf1
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.00423f11
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 0x498151
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 0x498010
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