Function at 0x4c5fc0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x44]
push ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x44], 0
xor eax, eax
push fcn.004c5f60
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x10], 0
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x40]
push eax
mov edx, 0x537ef0
lea eax, [ebp - 0x18]
mov ecx, 1
call fcn.0040bda0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
cmp dword [eax + 0x98], 0
je 0x4c6081
push dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x9c]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0xc]
mov ebx, dword [ebx + 4]
mov ebx, dword [ebx + 0x20]
call dword [ebx + 0x98]
cmp byte [ebp - 0x10], 0
jne 0x4c63ae
jmp 0x4c6428
mov ecx, 0x537ef0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1c]
lea eax, [ebp - 0x18]
call fcn.0040bd80
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4c60a1
mov eax, dword [eax - 4]
add eax, 1
cmp eax, 0xc0
jl 0x4c6428
lea ebx, [ebp - 0x14]
mov edx, 0x537ef0
mov eax, ebx
call fcn.0040d8a0
mov ecx, ebx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
call fcn.004c5950
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c60d5
mov eax, dword [eax - 4]
add eax, 1
test eax, eax
je 0x4c6428
lea esi, [esi]
push dword [ebp - 0x14]
mov ecx, 0x56f084
mov edx, 1
mov eax, 0x54222c
call fcn.0049aa90
mov dword [ebp - 0x30], eax
xor eax, eax
push fcn.004c5f40
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
push 0xa0
lea eax, [ebp - 0x44]
push eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x30]
xor ecx, ecx
call fcn.0049a990
lea eax, [ebp - 0x44]
mov edx, 0x537ef0
call fcn.0040bc80
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x4c6140
mov eax, dword [eax - 4]
add eax, 1
cmp eax, 0x20
jne 0x4c6176
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x18]
add eax, 0xa0
mov ecx, 0x20
call fcn.004859d0
test eax, eax
jne 0x4c6176
lea esi, [esi]
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004c5f40
jmp 0x4c6180
call fcn.00403710
jmp 0x4c6428
mov edx, 1
mov eax, 0x53a0b4
mov ecx, 0x53a0b4
call dword [ecx + pe_nt_image_headers32]
mov dword [ebp - 0x2c], eax
xor eax, eax
push fcn.004c5f50
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x2c]
mov dl, 1
call fcn.00486180
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
call fcn.004861e0
push 0x10
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov ecx, 0x10
call fcn.00486220
push pe_nt_image_headers32
push dword [ebp - 0x18]
push 0x20
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov ecx, 0x20
call fcn.00486fc0
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004c5f50
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 0x18]
add eax, 0x20
mov ecx, 4
call fcn.00402d40
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x38]
mov dword [eax + 0xc], edx
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 0x18]
add eax, 0x24
mov ecx, 4
call fcn.00402d40
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x38]
mov dword [eax + 0x14], edx
mov dword [ebp - 0x40], 8
lea eax, [ebp - 0x40]
push eax
mov edx, 0x537ef0
lea eax, [ebp - 0x1c]
mov ecx, 1
call fcn.0040bda0
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
add eax, 0x28
mov ecx, 8
call fcn.00402d40
mov ecx, 0x537ef0
mov eax, dword [ebp - 8]
add eax, 0x24
mov edx, dword [ebp - 0x1c]
call fcn.0040bd80
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
mov al, byte [eax + 0x30]
mov byte [edx + 0xf], al
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x30], 4
ja 0x4c6428
mov edx, dword [ebp - 0x18]
movzx eax, byte [edx + 0x31]
shl eax, 8
movzx edx, byte [edx + 0x32]
add eax, edx
mov word [ebp - 0x3c], ax
mov dx, ax
mov eax, 0x56f4ec
call fcn.004b8890
mov edx, dword [ebp - 8]
mov byte [edx + 0xd], al
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd], 0
je 0x4c6428
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x33], 1
jne 0x4c62d6
mov eax, dword [ebp - 8]
mov byte [eax + 0xe], 2
jmp 0x4c62dd
mov eax, dword [ebp - 8]
mov byte [eax + 0xe], 0
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x34]
mov dword [ebp - 0x28], eax
test eax, eax
jle 0x4c6332
cmp eax, 0x20
jg 0x4c6332
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push eax
mov edx, 0x537ef0
lea eax, [ebp - 0x20]
mov ecx, 1
call fcn.0040bda0
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
add eax, 0x35
call fcn.00402d40
mov ecx, 0x537ef0
mov eax, dword [ebp - 8]
add eax, 0x18
mov edx, dword [ebp - 0x20]
call fcn.0040bd80
jmp 0x4c6352
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x40]
push eax
mov edx, 0x537ef0
mov eax, dword [ebp - 8]
add eax, 0x18
mov ecx, 1
call fcn.0040bda0
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x55]
mov dword [ebp - 0x28], eax
test eax, eax
jle 0x4c639f
cmp eax, 0x30
jg 0x4c639f
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push eax
mov edx, 0x537ef0
lea eax, [ebp - 0x24]
mov ecx, 1
call fcn.0040bda0
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
add eax, 0x56
call fcn.00402d40
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
call fcn.00493650
jmp 0x4c63ae
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.00493650
jmp 0x4c6428
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
jbe 0x4c6400
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
cmp eax, dword [edx + 0x14]
jb 0x4c63d2
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
mov edx, dword [edx + 0x14]
sub eax, edx
mov dword [ebp - 0x34], eax
jmp 0x4c63e8
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x14]
mov eax, 0xffffffff
sub eax, edx
add eax, dword [ecx + 0x10]
add eax, 1
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x7c]
imul eax, eax, 0x3e8
cmp eax, dword [ebp - 0x34]
jl 0x4c6428
nop
call fcn.0046f860
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0xc]
mov dword [ebp - 0x34], eax
mov edx, eax
test edx, edx
jl 0x4c6428
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
cmp edx, dword [eax + 0x7c]
jg 0x4c6428
mov esi, esi
mov byte [ebp - 0x10], 1
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004c5f60
mov al, byte [ebp - 0x10]
pop ebx
mov esp, ebp
pop ebp
ret