Function at 0x40d940
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov eax, dword [esp + 0x68]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp + 8], 0x1715
mov byte [esp + 0xa], 0xe
mov word [esp + 0xb], 0
mov byte [esp + 0xd], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0x42
xor cl, byte [esp + eax + 8]
add cl, 0xb6
mov byte [esp + eax + 8], cl
inc eax
cmp eax, 6
jne 0x40d980
mov dword [esp + 0x14], 0x4a444862
mov dword [esp + 0x18], 0x5f46
mov ebx, 0x8b3618ae
mov ebp, 0x166c315c
movzx edi, byte [esp + ebx + 0x74c9e766]
mov eax, ebp
and eax, 0x64c111e
mov edx, ebx
xor edx, 0x23ae4a8f
lea ecx, [edx + eax]
add eax, edx
add eax, 0x52
and eax, edi
mov esi, eax
and esi, 0xfffffffd
mov edx, eax
or edx, 0xfd
inc edx
imul edx, esi
mov esi, eax
and esi, 2
or eax, 2
imul eax, esi
sub edx, eax
lea eax, [edi + ecx]
add eax, 0x52
add eax, edx
add al, 0x35
mov byte [esp + ebx + 0x74c9e766], al
inc ebx
add ebp, 2
cmp ebx, 0x8b3618b6
jne 0x40d9b0
mov dword [esp + 0x24], 0x681fc5d7
mov dword [esp + 0x28], 0x6f656b6a
mov dword [esp + 0x2c], 0x6e162068
mov dword [esp + 0x30], 0x60676765
mov dword [esp + 0x34], 0x18151f6b
mov dword [esp + 0x38], 0x174e611a
mov dword [esp + 0x3c], 0x5211151d
mov dword [esp + 0x40], 0x2120004
mov dword [esp + 0x44], 0x1e085b69
mov dword [esp + 0x48], 0x5b7d040b
mov byte [esp + 0x4c], 0xbc
mov dword [esp + 0x4d], 0
mov dword [esp + 0x50], 0
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + ebx + 0x24]
lea ecx, [ebx - 0x2bc9e351]
xor ecx, eax
mov eax, ecx
and eax, 0x14
xor ecx, 0x94
lea eax, [ecx + eax*2]
inc al
mov byte [esp + ebx + 0x24], al
mov eax, ebx
and eax, 0x2a
xor eax, 0xe308412a
mov ecx, ebx
and ecx, 0x14
sub ecx, eax
and ebx, 1
add ebx, ecx
add ebx, 0xe308412b
cmp ebx, 0x30
jb 0x40da80
mov eax, dword [esp + 0x1c]
add dword [esp + 0x10], eax
mov word [esp], 0xdcdd
mov byte [esp + 2], 0xe2
mov word [esp + 3], 0
mov byte [esp + 5], 0
mov edi, 0x2e5f8f28
mov ebp, dword [esp + 0x20]
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + edi - 0x2e5f8f28]
mov edx, edi
and edx, eax
mov esi, edx
not esi
lea ebx, [edx + esi*2]
mov ecx, 0xfffffffe
sub ecx, ebx
or eax, edi
lea ebx, [eax + eax]
not ebx
add ebx, eax
lea eax, [edx + esi*2]
inc eax
and eax, ebx
xor ecx, ebx
add ecx, ebx
sub ecx, eax
lea eax, [ecx + ecx]
not eax
add eax, ecx
add al, 0x38
mov byte [esp + edi - 0x2e5f8f28], al
inc edi
cmp edi, 0x2e5f8f2e
jne 0x40daf0
movzx ecx, byte [esp]
mov eax, dword [esp + 0x10]
mov edi, eax
test cl, cl
je 0x40db5b
lea ebx, [esp + 1]
mov edi, eax
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40db50
mov byte [edi], 0
movzx ecx, byte [ebp + 0x60]
test cl, cl
mov edx, dword [esp + 0x70]
mov esi, dword [esp + 0x6c]
je 0x40db8b
lea ebx, [ebp + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40db80
mov byte [edi], 0
movzx ecx, byte [esp + 0x24]
test cl, cl
je 0x40dbab
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 0x40dba0
mov byte [edi], 0
movzx ecx, byte [esi]
test cl, cl
je 0x40dbcb
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 0x40dbc0
mov byte [edi], 0
movzx ecx, byte [esp + 0x14]
test cl, cl
je 0x40dbeb
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 0x40dbe0
mov byte [edi], 0
movzx ecx, byte [edx]
test cl, cl
je 0x40dc0b
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 0x40dc00
mov byte [edi], 0
movzx ecx, byte [esp + 8]
test cl, cl
je 0x40dc2b
lea edx, [esp + 9]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40dc20
mov byte [edi], 0
sub edi, eax
mov eax, dword [ebp + 0x80]
mov ecx, eax
and ecx, edi
xor edi, eax
lea eax, [edi + ecx*2]
mov dword [ebp + 0x80], eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc