Function at 0x4c9cc0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x503f12
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x5364d0]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x10]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
push 0xffffffffffffffff
xor edi, edi
push edi
lea eax, [esp + 0x34]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, 1
jne 0x4c9fb5
push 4
call fcn.004e4a44
add esp, 4
cmp eax, edi
je 0x4c9d38
lea ecx, [esp + 0x44]
mov dword [eax], ecx
jmp 0x4c9d3a
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
lea eax, [esi + 0x50]
push eax
mov dword [esp + 0x6c], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add esi, 0x18
lea edx, [esp + 0x44]
cmp esi, edx
je 0x4c9dc4
mov eax, dword [esi]
mov ecx, dword [esp + 0x44]
mov dword [esi], ecx
mov dword [esp + 0x44], eax
cmp ecx, eax
je 0x4c9d7f
mov edi, dword [eax]
mov edx, dword [ecx]
mov dword [ecx], edi
mov dword [eax], edx
lea eax, [esi + 0xc]
lea edx, [esp + 0x50]
cmp eax, edx
je 0x4c9d96
mov ecx, dword [eax]
mov edx, dword [esp + 0x50]
mov dword [eax], edx
mov dword [esp + 0x50], ecx
lea eax, [esi + 0x10]
lea ecx, [esp + 0x54]
cmp eax, ecx
je 0x4c9dad
mov ecx, dword [eax]
mov edx, dword [esp + 0x54]
mov dword [eax], edx
mov dword [esp + 0x54], ecx
lea eax, [esi + 0x14]
lea ecx, [esp + 0x58]
cmp eax, ecx
je 0x4c9dc4
mov ecx, dword [eax]
mov edx, dword [esp + 0x58]
mov dword [eax], edx
mov dword [esp + 0x58], ecx
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
cmp dword [esi + 0xc], eax
jbe 0x4c9dd5
call fcn.004e48f7
mov ebx, dword [esi + 0xc]
mov edi, dword [esi]
cmp ebx, dword [esi + 0x10]
jbe 0x4c9de4
call fcn.004e48f7
mov ecx, dword [esp + 0x14]
mov eax, dword [esi]
push ecx
push edi
push ebx
push eax
lea edx, [esp + 0x4c]
push edx
push esi
call fcn.004ca320
mov eax, dword [ebp + 8]
add eax, 0x50
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov edx, eax
sub edx, ecx
test edx, 0xffffffe0
jne 0x4c9e34
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x6c], 0xffffffff
call fcn.004ca170
mov esi, dword [ebp + 8]
jmp 0x4c9d07
mov dword [esp + 0x18], 0
mov ebx, ecx
cmp ecx, eax
jbe 0x4c9e4f
call fcn.004e48f7
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ebx
mov edi, eax
cmp ecx, eax
jbe 0x4c9e66
call fcn.004e48f7
test esi, esi
je 0x4c9e70
cmp esi, dword [esp + 0x44]
je 0x4c9e75
call fcn.004e48f7
cmp ebx, edi
je 0x4c9f82
test esi, esi
jne 0x4c9f29
call fcn.004e48f7
cmp ebx, dword [esi + 0x10]
jb 0x4c9e94
call fcn.004e48f7
mov eax, dword [ebx + 0x18]
mov edi, dword [eax]
mov esi, dword [ebx]
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], esi
mov ecx, dword [ebx + 0x18]
mov eax, dword [ebx]
mov dword [esp + 0x38], ecx
test esi, esi
je 0x4c9eb4
cmp esi, eax
je 0x4c9eb9
call fcn.004e48f7
mov edx, dword [ebp + 8]
cmp edi, dword [esp + 0x38]
je 0x4c9f38
mov ebx, dword [edx + 4]
test ebx, ebx
je 0x4c9f9c
test esi, esi
jne 0x4c9f30
call fcn.004e48f7
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x4c9ee2
call fcn.004e48f7
mov eax, dword [edi + 0x10]
mov dword [esp + 0x14], eax
test esi, esi
jne 0x4c9f34
call fcn.004e48f7
cmp edi, dword [esi + 0x18]
jne 0x4c9efc
call fcn.004e48f7
mov edx, dword [esp + 0x14]
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0x14]
push 0
push edx
push eax
push ebx
call ecx
lea esi, [esp + 0x24]
call fcn.0048d760
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
jmp 0x4c9ea3
mov esi, dword [esi]
jmp 0x4c9e8a
mov eax, dword [esi]
jmp 0x4c9ed8
mov esi, dword [esi]
jmp 0x4c9ef2
mov eax, dword [edx + 4]
test eax, eax
je 0x4c9fa3
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x3a98
push eax
mov eax, dword [ecx + 0x18]
call eax
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4c9f7e
call fcn.004e48f7
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x4c9f6a
call fcn.004e48f7
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x1c]
add ebx, 0x20
jmp 0x4c9e57
mov eax, dword [eax]
jmp 0x4c9f60
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x6c], 0xffffffff
call fcn.004ca170
mov esi, dword [ebp + 8]
jmp 0x4c9d07
lea edx, [esp + 0x44]
push edx
jmp 0x4c9fa8
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x6c], 0xffffffff
call fcn.004ca170
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4