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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
push ebx
push edi
push esi
and eax, 0xffff0000
mov dword [ebp - 0x50], eax
mov ecx, 0x8000
push dword [ebp + 8]
pop ebx
add ebx, 0xbb5d0
mov eax, 0xbb5d0
mov edi, 0xbb5d0
mov edx, 0xea531ca5
sub edi, 4
sub ebx, 4
mov ecx, dword [ebx]
sub ecx, edi
sub edx, 0xb1fd5599
xor ecx, 0xa48da0b3
sub edx, 0xcee5efdd
xor ecx, 0x54522597
neg ecx
add ecx, edi
add ecx, edi
not ecx
rol ecx, 0xd
ror ecx, 0x87
xor ecx, edx
rol ecx, 0x63
rol ecx, 0x2c
xor ecx, edi
add edx, 0x8e3613a7
sub ecx, edi
neg ecx
add ecx, 0x336919cb
ror ecx, 0x77
sub ecx, edi
neg ecx
xor ecx, 0xf9856b9
neg ecx
xor ecx, edi
sub ecx, edi
add ecx, edx
add ecx, edi
sub ecx, edx
xor ecx, 0x8e126d81
sub ecx, edx
bswap ecx
neg ecx
sub ecx, edx
xor ecx, edx
bswap ecx
not ecx
rol ecx, 0x69
ror ecx, 0x7b
add ecx, 0xc2648ae8
sub ecx, edx
add ecx, edx
xor ecx, edi
mov dword [ebx], ecx
test edi, edi
jne 0x581d55
call fcn.0058213d
push 0
push 0x6c6c642e
push 0x32336c65
push 0x6e72656b
push esp
mov eax, dword [ebp + 0x10]
call dword [eax]
add esp, 0x10
mov edi, eax
push 0
push 0x636f6c6c
push 0x416c6175
push 0x74726956
push esp
push eax
mov eax, dword [ebp + 0xc]
call dword [eax]
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x582133
push 0x7463
push 0x65746f72
push 0x506c6175
push 0x74726956
push esp
push edi
mov eax, dword [ebp + 0xc]
call dword [eax]
add esp, 0x10
mov dword [ebp - 0x74], eax
test eax, eax
je 0x582133
push 0
push 0x79726575
push 0x516c6175
push 0x74726956
push esp
push edi
mov eax, dword [ebp + 0xc]
call dword [eax]
add esp, 0x10
mov dword [ebp - 0x78], eax
test eax, eax
je 0x582133
push 0
push 0x72745064
push 0x61655264
push 0x61427349
push esp
push edi
mov eax, dword [ebp + 0xc]
call dword [eax]
add esp, 0x10
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x582133
lea edi, [ebp - 0x1f8]
push edi
mov esi, dword [ebp + 8]
add esi, dword [esi + 0x3c]
push 0x3e
pop ecx
rep movsd dword es:[edi], dword [esi]
pop edi
mov eax, dword [edi + 0x34]
mov dword [ebp - 4], eax
mov ecx, dword [edi + 0x50]
mov dword [ebp - 8], ecx
push ecx
push 0x40
push 0x3000
push ecx
push eax
call ebx
pop ecx
test eax, eax
jne 0x581ee6
push 0x40
push 0x1000
push ecx
push eax
call ebx
test eax, eax
je 0x582133
mov dword [ebp - 0xc], eax
mov edi, eax
mov esi, dword [ebp + 8]
push esi
mov ecx, esi
add ecx, dword [esi + 0x3c]
mov ecx, dword [ecx + 0x54]
rep movsb byte es:[edi], byte [esi]
pop esi
add esi, dword [esi + 0x3c]
add esi, 0xf8
mov eax, dword [ebp + 8]
add eax, dword [eax + 0x3c]
movzx eax, byte [eax + 6]
lea edi, [ebp - 0x38]
push edi
push 0xa
pop ecx
rep movsd dword es:[edi], dword [esi]
pop edi
mov edx, dword [edi + 0x14]
test edx, edx
je 0x581f32
push esi
mov esi, dword [ebp + 8]
add esi, edx
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0xc]
mov edi, dword [ebp - 0xc]
add edi, edx
rep movsb byte es:[edi], byte [esi]
pop esi
dec eax
jne 0x581f0d
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 4]
je 0x581f99
mov eax, dword [ebp - 0xc]
mov ebx, eax
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0xa0]
test ebx, ebx
je 0x581f99
add ebx, eax
mov eax, dword [ebx + 4]
test eax, eax
je 0x581f99
lea ecx, [eax - 8]
shr ecx, 1
lea edi, [ebx + 8]
movzx eax, word [edi]
push edx
mov edx, eax
shr eax, 0xc
mov esi, dword [ebp - 0xc]
and dx, 0xfff
add esi, dword [ebx]
add esi, edx
pop edx
dec eax
jne 0x581f80
mov eax, edx
shr eax, 0x10
jmp 0x581f86
dec eax
jne 0x581f8b
movzx eax, dx
add word [esi], ax
jmp 0x581f90
dec eax
jne 0x581f90
add dword [esi], edx
inc edi
inc edi
loop 0x581f60
add ebx, dword [ebx + 4]
jmp 0x581f51
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x50]
add dword [ebp - 0x4c], edx
mov eax, dword fs:[0x30]
cmp dword [ebp - 0x44], 0
jne 0x581fb2
mov dword [eax + 8], ecx
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov esi, eax
mov edx, dword [eax + 0x18]
cmp edx, dword [ebp - 0x50]
jne 0x581fe9
mov edx, dword [eax + 0x1c]
cmp edx, dword [ebp - 0x4c]
jne 0x581fe9
mov edx, dword [eax + 0x20]
cmp edx, dword [ebp - 0x48]
jne 0x581fe9
mov dword [eax + 0x18], ecx
add ecx, dword [ebp - 0x1d0]
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp - 0x1a8]
mov dword [eax + 0x20], ecx
jmp 0x581ff1
cmp dword [eax], esi
je 0x581ff1
mov eax, dword [eax]
jmp 0x581fba
mov ebx, dword [ebp - 0x178]
test ebx, ebx
je 0x582067
mov esi, dword [ebp - 0xc]
add ebx, esi
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x582067
mov ecx, dword [ebx + 0x10]
add ecx, esi
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebx]
test ecx, ecx
jne 0x582018
mov ecx, dword [ebx + 0x10]
add ecx, esi
mov dword [ebp - 0x40], ecx
add eax, esi
push eax
mov eax, dword [ebp + 0x10]
call dword [eax]
test eax, eax
je 0x582133
mov edi, eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
test edx, edx
je 0x582062
test edx, 0x80000000
je 0x582048
and edx, 0x7fffffff
jmp 0x58204c
add edx, esi
inc edx
inc edx
push edx
push edi
mov eax, dword [ebp + 0xc]
call dword [eax]
mov ecx, dword [ebp - 0x3c]
mov dword [ecx], eax
add dword [ebp - 0x3c], 4
add dword [ebp - 0x40], 4
jmp 0x58202f
add ebx, 0x14
jmp 0x582000
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov ebx, dword [eax + 0xc]
mov dword [ebp - 0x70], ebx
mov edx, dword [ebx + 0x18]
cmp edx, dword [ebp - 0x50]
je 0x58211f
push edx
push 4
push edx
call dword [ebp - 0x7c]
pop edx
test eax, eax
jne 0x58211f
mov edi, edx
add edi, dword [edi + 0x3c]
mov edi, dword [edi + 0x80]
test edi, edi
je 0x58211f
add edi, edx
xor eax, eax
push edi
push 5
pop ecx
repe scasd eax, dword es:[edi]
pop edi
je 0x58211f
mov esi, dword [edi + 0x10]
add esi, dword [ebx + 0x18]
mov eax, dword [esi]
sub eax, dword [ebp - 0x50]
jb 0x5820c1
cmp eax, dword [ebp - 0x48]
jbe 0x5820c6
add edi, 0x14
jmp 0x5820a4
push 0x1c
lea eax, [ebp - 0x9c]
push eax
push esi
call dword [ebp - 0x78]
lea eax, [ebp - 0x88]
push eax
push 4
push dword [ebp - 0x90]
push dword [ebp - 0x9c]
call dword [ebp - 0x74]
test eax, eax
je 0x58211f
push edi
mov edi, esi
lodsd eax, dword [esi]
test eax, eax
je 0x582100
sub eax, dword [ebp - 0x50]
add eax, dword [ebp - 0xc]
stosd dword es:[edi], eax
jmp 0x5820f2
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x88]
push dword [ebp - 0x90]
push dword [ebp - 0x9c]
call dword [ebp - 0x74]
pop edi
jmp 0x5820c1
mov ebx, dword [ebx]
cmp ebx, dword [ebp - 0x70]
jne 0x582077
mov eax, dword [ebp - 0x1d0]
add eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
pop esi
pop edi
pop ebx
leave
ret 0xc