Function at 0x409780
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov edx, dword [esp + 0x70]
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp], eax
mov word [esp + 0xc], 0xd0f
mov byte [esp + 0xe], 0x1a
mov dword [esp + 0xf], 0
mov ebx, 0xfb
mov ebp, 4
nop
nop
nop
nop
nop
nop
movzx edi, byte [esp + ebx - 0xef]
mov ecx, ebp
xor ecx, ebx
and ecx, edi
xor ecx, ebx
add cl, 0x19
mov byte [esp + ebx - 0xef], cl
inc ebx
dec ebp
cmp ebx, 0x102
jne 0x4097c0
mov dword [esp + 0x14], 0x4e484c62
mov dword [esp + 0x18], 0x454e
mov byte [esp + 0x1c], 0
xor ebx, ebx
nop
nop
nop
nop
nop
movzx ecx, byte [esp + ebx + 0x14]
mov edi, ebx
or edi, 0x6919eb90
xor edi, ecx
add edi, 0xf27e662f
mov ecx, edi
and ecx, 1
xor edi, 1
lea ecx, [edi + ecx*2]
mov byte [esp + ebx + 0x14], cl
mov ecx, ebx
mov edi, ebx
xor edi, 1
add edi, ebx
and ebx, 1
and ecx, 0xe
mov ebp, edi
sub ebp, ecx
and edi, ebx
xor ebp, ebx
lea ebx, [edi*2]
add ebx, ebp
cmp ebx, 9
jb 0x409800
mov dword [esp + 0x24], 0xa89fc5d7
mov dword [esp + 0x28], 0xafa5abaa
mov dword [esp + 0x2c], 0xae96e0a8
mov dword [esp + 0x30], 0xa0a7a7a5
mov dword [esp + 0x34], 0x98959fab
mov dword [esp + 0x38], 0x97cea19a
mov dword [esp + 0x3c], 0xd291959d
mov dword [esp + 0x40], 0x82928084
mov dword [esp + 0x44], 0x9e88dba9
mov dword [esp + 0x48], 0xdbbd848b
mov byte [esp + 0x4c], 0xfc
mov dword [esp + 0x4d], 0
mov word [esp + 0x51], 0
xor edi, edi
nop
movzx ebp, byte [esp + edi + 0x24]
mov ebx, edi
and ebx, 0xd
mov eax, edi
and eax, 2
mov ecx, eax
xor ecx, 2
imul ecx, ebx
or ebx, 2
imul ebx, eax
add ebx, ecx
lea eax, [edi + edi]
and eax, 0x1e
neg eax
add eax, edi
add eax, 0xc91678cf
mov ecx, ebx
and ecx, eax
xor ebx, eax
lea ebx, [ebx + ecx*2]
xor ebx, ebp
mov eax, 0xb
sub eax, ebx
add ebx, 0xf4
and eax, 0x54
and ebx, 0xab
sub ebx, eax
add bl, 0x55
mov byte [esp + edi + 0x24], bl
mov eax, edi
mov ecx, edi
xor ecx, 1
add ecx, edi
and edi, 1
and eax, 0x3e
mov ebx, ecx
sub ebx, eax
and ecx, edi
xor ebx, edi
lea edi, [ebx + ecx*2]
cmp edi, 0x2f
jb 0x4098b0
mov ebp, dword [esp + 0x68]
add ebp, dword [esp]
mov word [esp + 4], 0xdcdd
mov byte [esp + 6], 0xb6
mov word [esp + 7], 0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
add al, 0x1e
xor al, byte [esp + ecx + 4]
add al, 0x6a
mov byte [esp + ecx + 4], al
lea eax, [ecx + ecx]
and eax, 2
mov edi, eax
and edi, ecx
xor eax, ecx
xor eax, 1
lea ecx, [eax + edi*2]
cmp ecx, 5
jb 0x409950
movzx ebx, byte [esp + 4]
mov dword [esp], ebp
mov edi, ebp
test bl, bl
mov ebp, dword [esp + 0x20]
je 0x40999b
lea ecx, [esp + 5]
mov edi, dword [esp]
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ecx]
inc ecx
test bl, bl
jne 0x409990
mov byte [edi], 0
movzx ecx, byte [ebp + 0x60]
test cl, cl
je 0x4099bb
lea ebx, [ebp + 0x61]
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x4099b0
mov byte [edi], 0
movzx ecx, byte [esp + 0x24]
test cl, cl
je 0x4099db
lea ebx, [esp + 0x25]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x4099d0
mov byte [edi], 0
movzx ecx, byte [esi]
test cl, cl
je 0x4099fb
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x4099f0
mov byte [edi], 0
movzx ecx, byte [esp + 0x14]
test cl, cl
je 0x409a1b
lea esi, [esp + 0x15]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x409a10
mov byte [edi], 0
movzx ecx, byte [edx]
test cl, cl
je 0x409a3b
inc edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x409a30
mov byte [edi], 0
movzx ecx, byte [esp + 0xc]
test cl, cl
je 0x409a5b
lea edx, [esp + 0xd]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x409a50
mov byte [edi], 0
mov eax, edi
mov ecx, dword [esp]
xor eax, ecx
not ecx
and ecx, edi
add ecx, ecx
sub ecx, eax
add dword [ebp + 0x80], ecx
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc