Function at 0x405540
Capabilities:
Access peb ldr_data
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d8a6
mov eax, dword fs:[0]
push eax
sub esp, 0x850
mov eax, dword [0x43b698]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, ecx
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x854], eax
lea eax, [ebp - 0x814]
mov byte [ebp - 0x814], 0x43
mov edx, dword [ecx]
mov edx, dword [edx + 0x30]
push eax
push 1
call edx
mov ecx, dword [esi + 0xc]
lea edx, [ebp - 0x814]
mov byte [ebp - 0x814], 0xbc
mov eax, dword [ecx]
mov eax, dword [eax + 0x30]
push edx
push 1
call eax
push 0x400
xor edi, edi
lea ecx, [ebp - 0x413]
push edi
push ecx
mov byte [ebp - 0x414], 0
call fcn.0042ccee
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x38]
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
push 1
call edx
mov al, byte [ebp - 0x414]
cmp al, 0x1f
je 0x405884
cmp al, 0x79
jne 0x405884
mov bl, byte [ebp + 8]
test bl, bl
jne 0x4056a5
push edi
push 0x43168c
lea ecx, [ebp - 0x84c]
mov dword [ebp - 0x838], 0xf
mov dword [ebp - 0x83c], edi
mov byte [ebp - 0x84c], bl
call fcn.00402700
push 0xffffffffffffffff
lea ecx, [ebp - 0x84c]
mov dword [ebp - 4], edi
call fcn.004026b0
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x2c]
lea edx, [ebp - 0x84c]
push edx
call eax
push edi
lea ecx, [ebp - 0x84c]
call fcn.004026b0
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x2c]
lea eax, [ebp - 0x84c]
push eax
call edx
mov esi, dword [esi + 0xc]
lea ecx, [ebp - 0x414]
mov byte [ebp - 0x414], 0xff
mov eax, dword [esi]
mov edx, dword [eax + 0x38]
push ecx
push 1
mov ecx, esi
call edx
cmp byte [ebp - 0x414], 0x79
lea ecx, [ebp - 0x84c]
jne 0x40569b
call fcn.00402590
xor al, al
jmp 0x405886
call fcn.00402590
jmp 0x405884
mov dword [ebp - 0x81c], 0xf
mov dword [ebp - 0x820], edi
mov byte [ebp - 0x830], 0
movzx eax, bl
dec al
lea ecx, [ebp - 0x830]
mov dword [ebp - 4], 1
mov byte [ebp - 0x858], al
push eax
call fcn.004026b0
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x2c]
lea edx, [ebp - 0x830]
push edx
call eax
movzx edi, bl
mov dword [ebp - 0x85c], edi
test edi, edi
jle 0x40579b
mov ecx, dword [ebp - 0x854]
lea ebx, [ecx + edi*2 - 2]
jmp 0x405710
cmp dword [ebp - 0x81c], 1
mov dl, byte [ebx]
mov byte [ebp - 0x850], dl
jae 0x405735
mov eax, dword [ebp - 0x820]
push eax
push 1
lea ecx, [ebp - 0x830]
call fcn.00402420
mov eax, dword [ebp - 0x830]
mov ecx, 0x10
cmp dword [ebp - 0x81c], ecx
jae 0x40574e
lea eax, [ebp - 0x830]
mov dl, byte [ebp - 0x850]
mov byte [eax], dl
mov eax, dword [ebp - 0x830]
mov dword [ebp - 0x820], 1
cmp dword [ebp - 0x81c], ecx
jae 0x405774
lea eax, [ebp - 0x830]
mov byte [eax + 1], 0
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x2c]
lea edx, [ebp - 0x830]
push edx
call eax
dec edi
sub ebx, 2
test edi, edi
jg 0x405710
mov edi, dword [ebp - 0x85c]
mov ecx, dword [ebp - 0x854]
mov bl, byte [ecx]
mov eax, 1
cmp edi, eax
jle 0x4057ba
lea esp, [esp]
mov edx, ecx
xor bl, byte [edx + eax*2]
inc eax
cmp eax, edi
jl 0x4057b0
cmp dword [ebp - 0x81c], 1
jae 0x4057d7
mov eax, dword [ebp - 0x820]
push eax
push 1
lea ecx, [ebp - 0x830]
call fcn.00402420
mov al, byte [ebp - 0x858]
mov ecx, dword [ebp - 0x830]
mov edi, 0x10
xor al, bl
cmp dword [ebp - 0x81c], edi
jae 0x4057f8
lea ecx, [ebp - 0x830]
mov byte [ecx], al
mov eax, dword [ebp - 0x830]
mov dword [ebp - 0x820], 1
cmp dword [ebp - 0x81c], edi
jae 0x405818
lea eax, [ebp - 0x830]
mov byte [eax + 1], 0
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x2c]
lea eax, [ebp - 0x830]
push eax
call edx
mov esi, dword [esi + 0xc]
lea ecx, [ebp - 0x414]
mov byte [ebp - 0x414], 0xff
mov eax, dword [esi]
mov edx, dword [eax + 0x38]
push ecx
push 1
mov ecx, esi
call edx
cmp byte [ebp - 0x414], 0x79
jne 0x40586d
cmp dword [ebp - 0x81c], edi
jb 0x405869
mov eax, dword [ebp - 0x830]
push eax
call fcn.0042cccc
add esp, 4
xor al, al
jmp 0x405886
cmp dword [ebp - 0x81c], edi
jb 0x405884
mov ecx, dword [ebp - 0x830]
push ecx
call fcn.0042cccc
add esp, 4
mov al, 0x14
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ccde
mov esp, ebp
pop ebp
ret 8