Function at 0x565f30
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x168
push ebx
push esi
push edi
mov edi, dword [esp + 0x178]
xor ebx, ebx
mov esi, 1
mov eax, dword [edi]
mov dword [esp + 0x34], esi
cmp eax, ebx
je 0x5664c8
push eax
call fcn.00566a20
mov ecx, dword [edi + 0x14]
add esp, 4
cmp ecx, ebx
je 0x5664c8
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
test eax, 0x40000000
push ebp
mov dword [esp + 0x40], esi
je 0x5660e7
cmp ecx, 0xffffffff
jne 0x565fb7
push ebx
push ebx
push esi
call fcn.005354c0
add esp, 0xc
test eax, eax
jne 0x566495
test byte [edi + 8], 1
je 0x565fa1
push 1
jmp 0x565fa2
push ebx
push esi
call fcn.00564e70
add esp, 8
push esi
call 0x96860f
mov ebx, dword [edi + 0xc]
push 0
push ebx
push esi
mov dword [esp + 0x3c], ebx
call fcn.005354c0
add esp, 0xc
cmp eax, ebx
jne 0x566495
push esi
push ecx
call 0x7e285c
test byte [edi + 8], 1
je 0x5660a6
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x14]
push 4
push ecx
push esi
mov dword [esp + 0x20], 0x605444f
mov dword [esp + 0x2c], eax
call fcn.005353a0
mov edx, dword [esp + 0x2c]
push edx
call fcn.005358b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x566495
mov eax, dword [esp + 0x20]
push eax
push eax
mov eax, dword [edi + 0x14]
push eax
push ebx
call fcn.005214d0
mov ebp, eax
push ebp
push ebx
push esi
call fcn.005353a0
push ebx
mov dword [esp + 0x4c], eax
call fcn.00535980
mov eax, dword [esp + 0x4c]
add esp, 0x20
cmp ebp, eax
jne 0x566495
mov ecx, dword [esp + 0x30]
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], 0x605444f
mov dword [esp + 0x18], ebp
mov word [esp + 0x28], 0
mov dword [esp + 0x1c], edx
mov ecx, 4
mov al, cl
mov dl, 3
imul dl
mov bl, byte [esp + ecx + 0x14]
sub al, 0x5b
xor bl, al
mov byte [esp + ecx + 0x14], bl
inc ecx
cmp ecx, 0x16
jb 0x566070
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.005353a0
add esp, 0xc
cmp eax, 0x16
jne 0x566495
jmp 0x56649d
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
push eax
push ecx
push esi
mov dword [esp + 0x2c], eax
call fcn.005353a0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp eax, ecx
jne 0x566495
mov edx, dword [edi + 0x1c]
xor eax, eax
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], eax
mov word [esp + 0x28], ax
mov dword [esp + 0x1c], edx
jmp 0x566088
test eax, 0x80000000
je 0x56649d
mov ebp, dword [edi + 0x18]
push ebx
push ebp
push esi
call fcn.005354c0
add esp, 0xc
cmp eax, ebp
jne 0x566495
push esi
push ebp
call 0x70cb3e
test eax, eax
je 0x566495
mov ecx, dword [edi]
push ecx
call fcn.00566dd0
mov ecx, eax
push edi
shl eax, 4
add eax, ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], ebx
lea edx, [eax + eax*8]
lea eax, [esp + 0x4c]
shl edx, 1
push eax
mov dword [esp + 0x2c], edx
call fcn.005658b0
mov edx, dword [0x61c390]
xor eax, eax
sub ebp, edx
add esp, 0xc
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], eax
mov word [esp + 0x28], ax
mov word [esp + 0x1c], ax
mov word [esp + 0x1e], ax
call fcn.005643f0
cmp eax, 0xffffffff
je 0x566495
mov edx, dword [0x61c394]
lea ecx, [eax*8]
sub ecx, eax
lea ebp, [edx + ecx*8]
mov dword [esp + 0x2c], ebp
mov dword [ebp + 0x20], 0x40000000
mov al, byte [edi + 8]
test al, 1
je 0x56636f
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], 0x605444f
lea ecx, [eax + eax]
push ecx
call fcn.005358b0
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
je 0x566495
mov edx, dword [esp + 0x20]
mov ebp, eax
lea ecx, [eax + edx]
lea edx, [esp + 0x74]
push edx
push pe_nt_image_headers32
push 0
mov dword [esp + 0x48], ecx
call fcn.00565680
add esp, 0xc
cmp eax, 0xffffffff
je 0x56635d
mov al, byte [esp + 0x74]
test al, al
je 0x56629f
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jge 0x56635d
mov edx, dword [0x61c388]
lea edi, [esp + 0x74]
lea esi, [esp + 0x44]
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x50], ecx
mov eax, dword [edx]
mov dword [esp + 0x54], eax
mov ecx, dword [edx + 8]
mov dword [esp + 0x58], ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x5c], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [0x61c390]
not ecx
dec ecx
mov word [esp + 0x60], cx
mov ecx, dword [edx + 0x10]
sub ecx, edi
mov edi, ebp
mov dword [esp + 0x6e], ecx
mov dx, word [edx + 4]
mov ecx, 0xb
mov word [esp + 0x4e], dx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsx ecx, word [esp + 0x60]
add ebp, 0x2e
mov eax, ecx
lea esi, [esp + 0x74]
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movsx eax, word [esp + 0x60]
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x17c]
add ebp, eax
lea ebx, [ebx + eax + 0x2e]
inc dword [esp + 0x10]
lea ecx, [esp + 0x74]
push ecx
call fcn.00565710
add esp, 4
cmp eax, 0xffffffff
jne 0x5661f2
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x14]
push 4
xor ecx, ecx
push edx
push esi
mov dword [eax + 8], ecx
mov dword [eax + 0x20], ecx
call fcn.005353a0
add esp, 0xc
cmp eax, 4
jne 0x56635d
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
push eax
push ebx
push ecx
push edx
call fcn.005214d0
mov ebp, eax
mov eax, dword [esp + 0x4c]
push ebp
push eax
push esi
mov dword [esp + 0x3c], ebx
call fcn.005353a0
add esp, 0x1c
cmp eax, ebp
jne 0x56635d
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00535980
mov eax, dword [esp + 0x14]
add esp, 4
mov dword [esp + 0x18], ebp
mov word [esp + 0x1c], ax
mov word [esp + 0x1e], ax
mov ecx, 4
mov al, cl
mov dl, 3
imul dl
mov bl, byte [esp + ecx + 0x14]
sub al, 0x5b
xor bl, al
mov byte [esp + ecx + 0x14], bl
inc ecx
cmp ecx, 0x16
jb 0x56632c
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.005353a0
add esp, 0xc
cmp eax, 0x16
je 0x56649d
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00535980
add esp, 4
jmp 0x566495
lea edx, [esp + 0x74]
push edx
push pe_nt_image_headers32
push 0
call fcn.00565680
add esp, 0xc
cmp eax, 0xffffffff
je 0x566495
mov al, byte [esp + 0x74]
test al, al
je 0x566447
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jge 0x566495
mov edx, dword [0x61c388]
lea edi, [esp + 0x74]
push 0x2e
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x54], ecx
mov eax, dword [edx]
mov dword [esp + 0x58], eax
mov ecx, dword [edx + 8]
mov dword [esp + 0x5c], ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x60], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [0x61c390]
dec ecx
mov word [esp + 0x64], cx
mov eax, dword [edx + 0x10]
movsx ecx, cx
sub eax, ecx
sub eax, edi
sub eax, 0x1e
mov dword [esp + 0x72], eax
mov cx, word [edx + 4]
lea edx, [esp + 0x48]
mov word [esp + 0x52], cx
push edx
push esi
call fcn.005353a0
add esp, 0xc
cmp eax, 0x2e
jne 0x56648e
mov ax, word [esp + 0x60]
lea ecx, [esp + 0x74]
movsx edi, ax
movsx eax, ax
push eax
push ecx
push esi
call fcn.005353a0
add esp, 0xc
cmp eax, edi
jne 0x56648e
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x2c]
inc eax
lea ebx, [ebx + edi + 0x2e]
mov edi, dword [esp + 0x17c]
mov dword [esp + 0x10], eax
lea edx, [esp + 0x74]
push edx
call fcn.00565710
add esp, 4
cmp eax, 0xffffffff
jne 0x56638c
xor eax, eax
push 0x16
mov dword [ebp + 8], eax
mov dword [ebp + 0x20], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.005353a0
add esp, 0xc
cmp eax, 0x16
je 0x56649d
jmp 0x566495
mov edi, dword [esp + 0x17c]
mov dword [esp + 0x38], 0
mov eax, dword [edi + 0x14]
pop ebp
cmp eax, 0xffffffff
je 0x5664b3
test eax, eax
je 0x5664b3
push eax
call fcn.00535980
add esp, 4
mov eax, dword [esp + 0x34]
mov dword [edi + 0x14], 0
pop edi
pop esi
pop ebx
add esp, 0x168
ret
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x168
ret