Function at 0x4052c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x2c]
sub esp, 0x154
mov dword [eax], 0
mov eax, dword [esp + 0x174]
test eax, eax
push ebp
mov ebp, dword [esp + 0x164]
push esi
je 0x40558d
mov edx, dword [eax]
cmp edx, 0x20
push ebx
push edi
lea edi, [esp + 0x14]
jge 0x405328
mov esi, dword [eax + 4]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x20
sub ecx, edx
lea edi, [esp + edx + 0x14]
mov edx, ecx
shr ecx, 2
mov esi, 0x463588
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405334
mov eax, dword [eax + 4]
mov ecx, 8
mov esi, eax
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x14]
push eax
mov ecx, eax
push 0x20
push ecx
call fcn.004040c0
mov eax, dword [esp + 0x178]
add esp, 0xc
cmp eax, 3
jne 0x40538f
mov esi, 0x32
lea edx, [esp + 0x14]
push edx
mov eax, edx
push 0x10
push eax
call fcn.004040c0
add esp, 0xc
dec esi
jne 0x405357
mov edx, dword [esp + 0x174]
mov esi, dword [edx + 4]
mov ecx, 8
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x13
mov dword [esp + 0x10], ecx
jmp 0x405434
cmp eax, 2
jne 0x40536c
lea ecx, [esp + 0x14]
push ecx
lea esi, [esp + 0x68]
mov ebx, ebp
call fcn.00403f00
mov ecx, dword [esp + 0x178]
mov edi, dword [ecx + 4]
add esp, 4
xor eax, eax
xor esi, esi
xor edx, edx
jmp 0x4053c0
lea ecx, [esi + 1]
and ecx, 0x800000ff
jns 0x4053d3
dec ecx
or ecx, 0xffffff00
inc ecx
movzx esi, cl
movzx ecx, byte [esp + esi + 0x64]
add ecx, edx
and ecx, 0x800000ff
jns 0x4053ed
dec ecx
or ecx, 0xffffff00
inc ecx
mov bl, byte [esp + esi + 0x64]
movzx edx, cl
mov cl, byte [esp + edx + 0x64]
mov byte [esp + esi + 0x64], cl
mov byte [esp + edx + 0x64], bl
movzx ecx, cl
movzx ebx, bl
add ecx, ebx
and ecx, 0x800000ff
jns 0x405418
dec ecx
or ecx, 0xffffff00
inc ecx
mov bl, byte [edi + eax]
mov cl, byte [esp + ecx + 0x64]
xor cl, bl
mov byte [esp + eax + 0x34], cl
inc eax
cmp eax, 0x20
jl 0x4053c0
jmp 0x4054e0
mov ecx, dword [esp + 0x10]
xor eax, eax
test ebp, ebp
jle 0x40544f
lea ebx, [ebx]
mov dl, byte [esp + eax + 0x14]
xor dl, cl
mov byte [esp + eax + 0x54], dl
inc eax
cmp eax, ebp
jl 0x405440
lea eax, [esp + 0x54]
push eax
lea esi, [esp + 0x68]
mov ebx, ebp
call fcn.00403f00
add esp, 4
xor esi, esi
xor ecx, ecx
xor edx, edx
jmp 0x405470
lea eax, [ecx + 1]
and eax, 0x800000ff
jns 0x405481
dec eax
or eax, 0xffffff00
inc eax
movzx ecx, al
movzx eax, byte [esp + ecx + 0x64]
add eax, edx
and eax, 0x800000ff
jns 0x405499
dec eax
or eax, 0xffffff00
inc eax
mov bl, byte [esp + ecx + 0x64]
movzx edx, al
mov al, byte [esp + edx + 0x64]
mov byte [esp + ecx + 0x64], al
movzx eax, al
movzx edi, bl
add eax, edi
and eax, 0x800000ff
mov byte [esp + edx + 0x64], bl
jns 0x4054c2
dec eax
or eax, 0xffffff00
inc eax
mov bl, byte [esp + esi + 0x34]
mov al, byte [esp + eax + 0x64]
xor bl, al
mov byte [esp + esi + 0x34], bl
inc esi
cmp esi, 0x20
jl 0x405470
dec dword [esp + 0x10]
jns 0x405430
push 8
call fcn.0043878d
add esp, 4
test eax, eax
pop edi
pop ebx
je 0x405502
push 0x20
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call fcn.00437820
mov esi, eax
jmp 0x405504
xor esi, esi
mov edx, dword [esp + 0x184]
mov eax, dword [esp + 0x178]
mov ecx, dword [esp + 0x174]
push edx
mov edx, dword [esp + 0x174]
push esi
push eax
mov eax, dword [esp + 0x178]
push ecx
mov ecx, dword [esp + 0x174]
push edx
mov edx, dword [esp + 0x174]
push eax
push ebp
push ecx
push edx
call fcn.00404d40
add esp, 0x24
test eax, eax
je 0x405579
test esi, esi
mov eax, dword [esp + 0x188]
mov dword [eax], 1
je 0x40556b
mov ecx, esi
call fcn.004378a0
push esi
call fcn.00438788
add esp, 4
pop esi
mov eax, 1
pop ebp
add esp, 0x154
ret
test esi, esi
je 0x40558d
mov ecx, esi
call fcn.004378a0
push esi
call fcn.00438788
add esp, 4
mov ecx, dword [esp + 0x184]
mov edx, dword [esp + 0x180]
mov eax, dword [esp + 0x178]
push ecx
mov ecx, dword [esp + 0x178]
push edx
mov edx, dword [esp + 0x178]
push eax
mov eax, dword [esp + 0x178]
push ecx
mov ecx, dword [esp + 0x174]
push edx
mov edx, dword [esp + 0x174]
push eax
push ebp
push ecx
push edx
call fcn.00404d40
add esp, 0x24
pop esi
pop ebp
add esp, 0x154
ret