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

Disassembly:
push 0xffffffffffffffff
push 0x52b51b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push ebp
push esi
push edi
push 0x3d0
mov dword [esp + 0x40], 1
call fcn.0050c4a3
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x3c], 2
je 0x4afec9
mov ecx, eax
call fcn.004d14a0
mov esi, eax
jmp 0x4afecb
xor esi, esi
mov eax, dword [0x569c90]
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x44]
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x3c], 3
lea ebp, [edi + 0xc]
lea ecx, [ebp + 8]
push ecx
call ebx
mov edx, dword [edi + 0x21c]
mov eax, dword [ebp]
mov ecx, ebp
mov dword [esp + 0x18], edx
call dword [eax + 0x14]
mov eax, dword [esp + 0x18]
and eax, 0xfff
cmp eax, 0x16
jne 0x4affa7
lea ecx, [esp + 0x20]
push ecx
mov ecx, edi
call fcn.004a01d0
mov edx, dword [eax]
lea eax, [ebp + 8]
push eax
mov byte [esp + 0x40], 4
mov dword [esp + 0x1c], edx
call ebx
mov ecx, dword [edi + 0x154]
mov edx, dword [ebp]
mov dword [esp + 0x1c], ecx
mov ecx, ebp
call dword [edx + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0x2c]
call fcn.0040dc00
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 6
call fcn.00507d3a
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x48]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call fcn.00507aaf
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x30]
call fcn.0040dde0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 7
call fcn.00507e73
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 6
call fcn.00507d3a
lea ecx, [esp + 0x24]
jmp 0x4affee
lea edx, [esp + 0x1c]
mov ecx, edi
push edx
call fcn.004a01d0
mov ecx, dword [esp + 0x48]
mov eax, dword [eax]
push ecx
lea edx, [esp + 0x24]
push eax
push edx
mov byte [esp + 0x48], 8
call fcn.00424830
add esp, 0xc
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 9
call fcn.00507e73
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 8
call fcn.00507d3a
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 3
call fcn.00507d3a
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.004a5480
mov ecx, dword [eax]
lea edx, [ebp + 8]
push edx
mov byte [esp + 0x40], 0xa
mov dword [esp + 0x24], ecx
call ebx
mov eax, dword [ebp]
mov edi, dword [edi + 0xb8]
mov ecx, ebp
call dword [eax + 0x14]
mov ecx, dword [esp + 0x20]
push ecx
push edi
lea ecx, [esp + 0x34]
call fcn.0040dc00
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 0xc
call fcn.00507d3a
mov edi, dword [esp + 0x50]
xor edx, edx
test edi, edi
sete dl
push edx
push ecx
lea eax, [esp + 0x54]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00507aaf
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x38]
call fcn.0040dde0
or eax, 0xffffffff
test edi, edi
jne 0x4b007a
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
lea edi, [esi + 0xc]
mov dword [esp + 0x18], edi
lea edx, [edi + 8]
push edx
call ebx
push 0xf4240
push 0
push ebp
lea ecx, [esp + 0x2c]
call fcn.004295c0
mov eax, dword [esp + 0x44]
lea ebp, [esi + 0x30]
add eax, 0x30
mov ecx, ebp
push eax
mov byte [esp + 0x40], 0xf
call fcn.00405250
mov ecx, esi
call fcn.004d3ba0
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x3c], 0xe
mov edx, dword [ecx]
call dword [edx + 0x14]
mov eax, dword [edi]
mov ecx, edi
mov byte [esp + 0x3c], 0xd
call dword [eax + 0x14]
lea ecx, [edi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
mov dword [esi + 0x250], edx
mov dword [esi + 0x254], eax
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x14]
mov ebx, dword [esp + 0x10]
lea eax, [edi + 8]
push eax
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
lea ecx, [esi + 0x20c]
mov byte [esp + 0x40], 0x10
call fcn.00507ec3
mov edx, dword [edi]
mov ecx, edi
mov byte [esp + 0x3c], 0xd
call dword [edx + 0x14]
mov ebx, dword [esp + 0x14]
push 0xf4240
push 0
push edi
lea ecx, [esp + 0x50]
call fcn.004295c0
push ebx
lea ecx, [esi + 0x210]
mov byte [esp + 0x40], 0x11
call fcn.00507ec3
mov ecx, dword [esp + 0x44]
mov byte [esp + 0x3c], 0xd
mov eax, dword [ecx]
call dword [eax + 0x14]
push 0xf4240
push 0
push edi
lea ecx, [esp + 0x50]
call fcn.004295c0
mov ecx, dword [esp + 0x50]
mov byte [esp + 0x3c], 0x12
push ecx
mov ecx, ebp
call fcn.00405390
mov ecx, dword [esp + 0x44]
mov byte [esp + 0x3c], 0xd
mov edx, dword [ecx]
call dword [edx + 0x14]
push 0
push 0x10005
mov ecx, esi
call fcn.004d1dc0
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 0xc
call fcn.00507d3a
lea ecx, [esp + 0x2c]
mov byte [esp + 0x3c], 3
call fcn.00507d3a
lea ecx, [esp + 0x10]
mov byte [esp + 0x3c], 1
call fcn.00507d3a
lea ecx, [esp + 0x48]
mov byte [esp + 0x3c], 0
call fcn.00507d3a
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00507d3a
mov ecx, dword [esp + 0x34]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x30
ret 0x18