Function at 0x4084d0
Capabilities:
Access peb ldr_data
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword fs:[0x18]
push ebx
push esi
push edi
cmp dword [eax + 0x2c], 0
je 0x408676
mov eax, dword [0x438ce4]
mov eax, dword [eax + 0x48]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x438ce4]
mov edi, dword [eax + 0x48]
mov edx, dword [edi + 0x2c]
lea esi, [edi + 0x2c]
cmp edx, esi
je 0x408529
nop dword [eax + eax]
mov ecx, dword fs:[0x18]
mov eax, dword [edx + 8]
cmp eax, dword [ecx + 0x24]
je 0x40867f
mov edx, dword [edx]
cmp edx, esi
jne 0x408510
mov eax, dword fs:[0x18]
mov ebx, dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0x14
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call ebx
mov esi, eax
test esi, esi
je 0x4086d5
mov ecx, dword fs:[0x18]
mov eax, dword fs:[0x18]
push 0x40c
push 8
mov ecx, dword [ecx + 0x2c]
mov dword [esi + 0xc], ecx
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call ebx
mov ecx, dword fs:[0x18]
mov edx, eax
mov eax, dword fs:[0x18]
mov dword [esi + 0x10], edx
mov ecx, dword [ecx + 0x24]
mov dword [esi + 8], ecx
test edx, edx
je 0x4086c6
mov ecx, dword [esi + 0xc]
add edx, 8
mov dword [esi + 0x10], edx
mov edi, dword [ecx - 8]
cmp edi, dword [eax + 0x24]
je 0x4085b0
lea eax, [edi*4]
push eax
push ecx
push edx
call fcn.0040da80
add esp, 0xc
mov ecx, dword fs:[0x18]
mov eax, dword [esi + 0x10]
mov dword [ecx + 0x2c], eax
mov eax, dword [0x438ce4]
mov ecx, dword [eax + 0x48]
mov eax, dword [ecx + 0x30]
add ecx, 0x2c
mov dword [esi + 4], eax
mov dword [esi], ecx
mov dword [eax], esi
mov dword [ecx + 4], esi
mov eax, dword [0x438ce4]
mov eax, dword [eax + 0x48]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x438ce4]
mov eax, dword [eax + 0x48]
add eax, 0x10
push eax
call dword [sym.imp.ntdll.dll_RtlAcquireSRWLockShared]
mov eax, dword fs:[0x18]
mov ecx, dword [0x438ce4]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x48]
mov esi, dword [eax]
cmp esi, eax
je 0x40865e
mov edi, dword [esi + 0xc]
sub edi, dword [esi + 8]
je 0x408692
mov eax, dword fs:[0x18]
push edi
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call ebx
mov ebx, eax
test ebx, ebx
je 0x408692
push edi
push dword [esi + 8]
push ebx
call fcn.0040da80
mov eax, dword [esi + 0x1c]
add esp, 0xc
mov ecx, dword [ebp - 4]
mov dword [ecx + eax*4], ebx
mov eax, dword [0x438ce4]
mov esi, dword [esi]
mov ebx, dword [sym.imp.ntdll.dll_RtlAllocateHeap]
cmp esi, dword [eax + 0x48]
jne 0x408614
mov eax, dword [eax + 0x48]
add eax, 0x10
push eax
call dword [sym.imp.ntdll.dll_RtlReleaseSRWLockShared]
mov eax, dword [0x438ce4]
mov eax, dword [eax + 0x48]
add eax, 0x34
lock inc dword [eax]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword fs:[0x18]
push 0
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [0x438ce4]
mov eax, dword [eax + 0x48]
add eax, 0x10
push eax
call dword [sym.imp.ntdll.dll_RtlReleaseSRWLockShared]
pop edi
pop esi
mov eax, 8
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + 0x30]
push esi
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [0x438ce4]
mov eax, dword [eax + 0x48]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, 8
pop ebx
mov esp, ebp
pop ebp
ret