Function at 0x49d430
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x61bb78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebp
mov ebp, ecx
lea eax, [ebp + 0x58]
push edi
mov dword [esp + 0x10], eax
mov eax, dword [eax]
xor edi, edi
cmp eax, edi
je 0x49d46e
pop edi
mov al, 1
pop ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov dword [ebp + 0x70], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov eax, dword [ebp]
mov edx, dword [eax + 0x13c]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebp
mov dword [esp + 0x30], edi
call edx
test al, al
jne 0x49d4b3
mov eax, dword [esp + 0x20]
push eax
call fcn.005f7a6f
add esp, 4
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov edx, dword [esp + 0x20]
lea ecx, [esp + 8]
push ecx
push edx
call fcn.005d9170
add esp, 8
cmp eax, edi
je 0x49d493
mov ecx, dword [esp + 8]
push esi
push edi
push ecx
push eax
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push edx
push eax
lea esi, [ebp + 0x5c]
push esi
call fcn.005d9840
lea eax, [ebp + 0x138]
push eax
call fcn.0049aaf0
add esp, 0x1c
test al, al
jne 0x49d51a
mov ecx, dword [esp + 0x24]
push ecx
call fcn.005f7a6f
add esp, 4
pop esi
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
push ebx
push 0x400
lea ebx, [ebp + 0x190]
push 0
push ebx
call fcn.005f7e70
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp dword [eax + 0x10], 0
jne 0x49d553
movzx ecx, word [eax + 0xe]
cmp cx, 8
ja 0x49d553
mov edi, dword [eax + 0x20]
test edi, edi
jne 0x49d553
mov edi, 1
shl edi, cl
push eax
call fcn.005190cd
mov ecx, dword [esp + 0x28]
sub ecx, eax
shr ecx, 2
add esp, 4
test ecx, ecx
jle 0x49d594
cmp edi, ecx
jbe 0x49d56f
mov edi, ecx
cmp edi, 0x100
jbe 0x49d57c
mov edi, 0x100
mov ecx, dword [esp + 0x28]
lea edx, [edi*4]
push edx
add ecx, eax
push ecx
push ebx
call fcn.005f7b00
add esp, 0xc
mov dword [ebp + 0x60], ebx
call fcn.00497860
mov ebx, eax
mov dword [esp + 0x14], ebx
mov eax, dword [ebp + 0x144]
mov ecx, dword [ebp + 0x140]
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push eax
mov eax, dword [ebp + 0x13c]
push ecx
mov ecx, dword [ebp + 0x138]
push eax
push ecx
mov ecx, ebx
mov byte [esp + 0x44], 1
call edx
cmp byte [ebp + 0x152], 0
je 0x49d5e5
mov ecx, dword [ebp + 0x14c]
mov eax, dword [ebx]
mov edx, dword [eax + 8]
push ecx
mov ecx, ebx
call edx
movzx ecx, byte [ebp + 0x154]
movzx edx, byte [ebp + 0x153]
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
push ecx
push edx
mov ecx, ebx
call eax
movzx eax, byte [ebp + 0x155]
mov edx, dword [ebx]
mov edx, dword [edx + 0x10]
push eax
mov ecx, ebx
call edx
mov ecx, dword [ebp + 0x148]
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push ecx
mov ecx, ebx
call edx
cmp byte [ebp + 0x151], 0
movzx edx, byte [ebp + 0x150]
mov eax, dword [ebx]
mov eax, dword [eax + 0x18]
sete cl
push ecx
push edx
mov ecx, ebx
call eax
mov edx, dword [ebp]
mov edx, dword [edx + 0x58]
lea edi, [ebp + 0x84]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebx]
lea eax, [esp + 0x1c]
push eax
mov ecx, ebp
add esi, 0x20
call edx
push eax
lea eax, [ebp + 0x84]
push eax
mov eax, dword [esi]
mov ecx, ebx
call eax
add ebp, 0x40
push ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x18]
push ebx
mov byte [esp + 0x38], 2
mov dword [esp + 0x18], 0
call fcn.004fb690
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005f7a6f
mov ecx, dword [esp + 0x30]
add esp, 4
pop ebx
pop esi
pop edi
mov al, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x28
ret