Function at 0x4055db
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
or dword [esp - 0x1000], 0
or dword [esp - 0x102c], 0
sub esp, 0x2c
cmp dword [ebp + 0xc], 1
mov ebx, dword [ebp + 8]
jne 0x4058fc
push 0
push 0
push 0x11
push 0xfffffffffffffffe
push 0
mov eax, 0xd
call dword fs:[0xc0]
add esp, 0x14
mov dword [0x150d840], 0x50d020
xor ecx, ecx
test ebx, ebx
je 0x4056f7
cmp word [ebx], 0x5a4d
jne 0x405647
mov eax, dword [ebx + 0x3c]
mov esi, ebx
mov edi, dword [ebx + eax + 0x88]
add edi, ebx
mov eax, edi
jmp 0x405653
movzx eax, word [ebx + 0x10]
mov esi, dword [ebx + eax + 0x28]
add esi, ebx
mov eax, esi
movzx ecx, word [eax + 0xe]
lea edx, [eax + 0x10]
lea edi, [edx + ecx*8]
cmp edx, edi
jae 0x40566c
cmp word [edx], 0xa
je 0x405676
add edx, 8
jmp 0x40565d
xor ecx, ecx
cmp edi, edx
je 0x4056f7
xor ecx, ecx
cmp byte [edx + 7], 0
jns 0x4056f7
mov ecx, dword [edx + 4]
and ecx, 0x7fffffff
add ecx, eax
lea edx, [ecx + 0x10]
movzx ecx, word [ecx + 0xe]
lea edi, [edx + ecx*8]
cmp edx, edi
jae 0x4056a2
cmp word [edx], 1
je 0x4056a8
add edx, 8
jmp 0x405693
xor ecx, ecx
cmp edi, edx
je 0x4056f7
xor ecx, ecx
cmp byte [edx + 7], 0
jns 0x4056f7
mov edx, dword [edx + 4]
and edx, 0x7fffffff
add edx, eax
lea edi, [edx + 0x10]
movzx edx, word [edx + 0xe]
lea ecx, [edi + edx*8]
mov edx, edi
cmp edx, ecx
jae 0x4056d6
cmp word [edx], 0
je 0x4056e2
add edx, 8
jmp 0x4056c7
cmp ecx, edx
jne 0x4056e2
xor ecx, ecx
cmp edi, edx
je 0x4056f7
mov edx, edi
xor ecx, ecx
cmp byte [edx + 7], 0
js 0x4056f7
add eax, dword [edx + 4]
mov edi, dword [eax + 4]
add esi, dword [eax]
mov ecx, esi
mov dword [ebp - 0x1c], edi
mov dword [esp + 0xc], 0x1000000
mov esi, 0x50d844
mov dword [esp + 8], 0x50d840
mov eax, dword [ebp - 0x1c]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004054ee
mov eax, dword [0x50d840]
lea edx, [eax + 0x50d844]
cmp esi, edx
jae 0x4058fc
mov eax, dword [esi]
add esi, 4
cmp al, 4
je 0x40573e
shr eax, 8
add esi, eax
jmp 0x405726
mov eax, dword fs:[0x30]
mov ecx, dword [0x150d840]
mov edx, esi
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov edi, dword [eax]
mov eax, dword [edi + 0x18]
mov dword [esp], 2
mov dword [ebp - 0x1c], ecx
call section..text
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx + eax*4]
cmp byte [esi], 0
je 0x40577a
inc esi
cmp byte [esi - 1], 0
jne 0x405771
jmp 0x40576c
mov eax, dword [edi + 0x18]
mov dword [esp], 1
inc esi
mov dword [ebp - 0x1c], ecx
mov edx, esi
call section..text
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx + eax*4]
cmp byte [esi], 0
je 0x4057a3
inc esi
cmp byte [esi - 1], 0
jne 0x40579a
jmp 0x405795
mov eax, dword [edi]
inc esi
mov edx, dword [eax + 0x30]
mov dx, word [edx]
and edx, 0xffffffdf
cmp dl, 0x4b
je 0x4057b6
mov eax, dword [eax]
xor edi, edi
mov eax, dword [eax + 0x18]
mov edx, esi
mov dword [esp], edi
mov dword [ebp - 0x1c], ecx
call section..text
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x1c], eax
cmp byte [esi], 0
je 0x4057df
inc esi
cmp byte [esi - 1], 0
jne 0x4057d6
jmp 0x4057d1
inc esi
cmp byte [esi], 0
je 0x405849
mov edi, esi
inc edi
cmp byte [edi - 1], 0
jne 0x4057e7
mov dword [esp], esi
mov eax, dword [0x150d840]
call dword [eax + 4]
mov ecx, eax
push edx
test eax, eax
jne 0x405839
mov dword [esp], esi
mov eax, dword [0x150d840]
call dword [eax + 8]
mov ecx, eax
push esi
jmp 0x405839
xor eax, eax
test ecx, ecx
je 0x405828
mov dword [esp], ecx
mov dword [esp + 4], edi
mov dword [ebp - 0x20], ecx
call dword [esi + 0xc]
push ecx
push ecx
mov ecx, dword [ebp - 0x20]
add dword [ebp - 0x1c], 4
mov esi, dword [ebp - 0x1c]
mov dword [esi - 4], eax
inc edi
cmp byte [edi - 1], 0
jne 0x405832
cmp byte [edi], 0
mov esi, dword [0x150d840]
jne 0x405810
lea esi, [edi + 1]
jmp 0x4057e0
mov eax, dword [0x150d840]
mov ecx, 0x50d844
mov dword [eax + 0x80c], ebx
mov ebx, dword [0x50d840]
mov dword [eax + 0x808], 0x50d840
mov dword [eax + 0x7fc], 0x40a7f0
lea edi, [ebx + 0x50d844]
mov dword [eax + 0x7f8], 0x405d39
mov dword [eax + 0x804], 0x4054ee
cmp ecx, edi
jae 0x4058f5
mov edx, dword [ecx]
lea esi, [ecx + 4]
mov ebx, edx
shr ebx, 8
cmp dl, 5
jne 0x4058e2
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov edx, dword [ecx + 0x14]
add edx, ebx
mov dword [esp + 4], edx
xor edx, edx
mov dword [esp], edx
call dword [eax + 0x32c]
sub esp, 0x10
test eax, eax
je 0x4058fc
mov ecx, ebx
mov edi, eax
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov dword [0x50d830], eax
mov esi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
add esi, eax
jmp 0x4058e7
lea ecx, [esi + ebx]
jmp 0x40588d
cmp ebx, edx
jle 0x4058fc
mov ecx, dword [esi + edx*4]
inc edx
add ecx, eax
add dword [ecx], eax
jmp 0x4058e7
mov eax, dword [0x10]
ud2
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc