Function at 0x40d900
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x118
cmp dword [ecx + 0x20], 0
je 0x40de97
lea eax, [ecx + 0x10]
push eax
mov esi, ecx
call fcn.0040a820
add esp, 4
mov eax, dword [esi + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 0x10], eax
mov dword [esp + 0x7c], 0xb8383b3c
mov eax, 0xc8e2730b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0x371d8d71]
lea ecx, [eax + 0x371d8d00]
or ecx, eax
and ecx, edx
mov ebx, ecx
and ebx, 0xd
mov ebp, ecx
and ebp, 2
mov edi, ecx
or edi, 0xfffffffd
inc edi
imul edi, ebx
or ecx, 2
imul ecx, ebp
add edi, edx
sub edi, ecx
add edi, eax
mov ecx, edi
and ecx, 0x48
xor edi, 0xc8
lea ecx, [edi + ecx*2]
inc cl
mov byte [esp + eax + 0x371d8d71], cl
inc eax
cmp eax, 0xc8e2730f
jne 0x40d950
mov eax, dword [esp + 0x7c]
push dword [eax + 0x14]
call fcn.0040ced0
add esp, 4
call fcn.0040cee0
mov dword [esp + 0x18], eax
mov ebx, eax
and ebx, 0xf
mov edi, 0xfffffff0
mov ebp, 0x38e38e39
mov esi, dword [esp + 4]
nop
nop
nop
nop
nop
call fcn.0040cee0
mov ecx, eax
imul ebp
mov eax, edx
shr eax, 0x1f
sar edx, 3
add edx, eax
shl edx, 2
lea eax, [edx + edx*8]
neg eax
movzx eax, byte [ecx + eax + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ]
mov byte [esi + edi + 0x70], al
inc edi
cmp ebx, edi
jne 0x40d9d0
mov dword [esp + 0x14], ebx
mov byte [esi + edi + 0x70], 0
movzx eax, byte [esi]
mov ecx, eax
and ecx, 2
mov edx, eax
or eax, 2
imul eax, ecx
xor ecx, 2
and edx, 0xfffffffd
imul edx, ecx
movzx eax, word [edx + eax + 0x4406d8]
mov word [esp + 9], ax
mov byte [esp + 0xb], 0
mov eax, dword [esp + 0xc]
add eax, 0x400
push eax
call fcn.0040c880
add esp, 4
mov ebx, eax
mov dword [esp + 0x7c], 0x6b574250
mov byte [esp + 0x80], 0xcc
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0x7c]
lea ecx, [eax + 0x60806bb2]
lea edi, [eax + 0xb2]
or ecx, edi
and ecx, edx
add ecx, ecx
add edx, eax
add edx, 0x60806bb2
mov edi, edx
not edi
and edi, ecx
not ecx
and ecx, edx
sub ecx, edi
add cl, 0x86
mov byte [esp + eax + 0x7c], cl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 0xa
jb 0x40da70
lea edi, [esp + 0x7c]
mov ecx, esi
push 0x447af0
push edi
push ebx
call fcn.0040d2e0
mov dword [esp + 0x7c], 0x99f6ecec
xor eax, eax
nop
nop
movzx edx, byte [esp + eax + 0x7c]
lea ecx, [eax + 0x9b]
mov ebp, 0x26633364
sub ebp, eax
xor ecx, ebp
and ecx, edx
xor ecx, ebp
not ecx
mov edx, ecx
and edx, 0xf8
mov ebp, ecx
or ebp, 0xf8
add ebp, edx
and ecx, 1
xor ebp, 1
lea ecx, [ecx*2]
add ecx, ebp
mov byte [esp + eax + 0x7c], cl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 4
jb 0x40dad0
lea eax, [esp + 9]
mov ecx, esi
push eax
push edi
push ebx
call fcn.0040d2e0
mov eax, dword [str.1AsNN2__2034450426]
mov dword [esp], eax
mov dword [esp + 0x7c], 0x3f9a9094
mov ecx, 0x8a
mov edx, 0x75
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + ecx - 0xe]
mov ebp, ecx
or ebp, eax
not eax
or eax, edx
and eax, ebp
add al, 0x92
mov byte [esp + ecx - 0xe], al
inc ecx
dec edx
cmp ecx, 0x8e
jne 0x40db50
mov ecx, esi
push dword [esp]
push edi
push ebx
call fcn.0040d2e0
mov dword [esp + 0x7c], 0x8b848497
mov dword [esp + 0x80], 0x9c8f80f7
mov dword [esp + 0x84], 0x9295f09f
mov byte [esp + 0x88], 0xc
mov dword [esp + 0x89], 0
mov byte [esp + 0x8d], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0xd2
xor cl, byte [esp + eax + 0x7c]
add cl, 0x22
mov byte [esp + eax + 0x7c], cl
inc eax
cmp eax, 0x12
jne 0x40dbc0
mov dword [esp + 0x1c], 0xf7a6e69
mov dword [esp + 0x20], 0
xor eax, eax
xor ecx, ecx
nop
nop
nop
nop
nop
nop
mov ebp, ecx
xor ebp, 0xd
mov edx, eax
and edx, 0xa
add edx, ebp
add dl, 0xe1
xor dl, byte [esp + ecx + 0x1c]
add dl, 0xe0
mov byte [esp + ecx + 0x1c], dl
inc ecx
add eax, 2
cmp ecx, 8
jne 0x40dbf0
lea eax, [esp + 0x1c]
mov ecx, esi
push edi
push eax
mov dword [esp + 8], ebx
push ebx
call fcn.0040d2e0
mov dword [esp + 0x7c], 0x6e726c6a
mov byte [esp + 0x80], 0
mov dword [esp + 0x81], 0
mov eax, 0xbcaa9881
mov esi, 0x414dc4a2
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0x435567fb]
mov ebx, eax
and ebx, edx
lea ebp, [eax + edx]
and ebp, 1
mov ecx, edx
add cl, al
movzx ecx, cl
and ecx, 1
lea ecx, [ecx + ebx*2]
add edx, esi
sub edx, ecx
mov ecx, edx
and ecx, ebp
xor edx, ebp
lea ecx, [edx + ecx*2]
mov byte [esp + eax + 0x435567fb], cl
inc eax
inc esi
cmp eax, 0xbcaa988a
jne 0x40dc50
mov ebx, dword [esp + 4]
mov ecx, ebx
push dword [esp + 0xc]
push dword [esp + 0x14]
push edi
push dword [esp + 0xc]
call fcn.0040d5a0
mov dword [esp + 0x1c], 0x51bf4f89
mov dword [esp + 0x20], 0x55a653be
mov dword [esp + 0x24], 0x59b857b3
mov dword [esp + 0x28], 0x5d755bac
mov dword [esp + 0x2c], 0x61a55f88
mov dword [esp + 0x30], 0x65856390
mov dword [esp + 0x34], 0x6946675e
mov dword [esp + 0x38], 0x6d9d6b87
mov dword [esp + 0x3c], 0x719a6f80
mov dword [esp + 0x40], 0x7582739b
mov dword [esp + 0x44], 0x79847797
mov dword [esp + 0x48], 0x7d4b7b8c
mov dword [esp + 0x4c], 0x18f7f9a
mov dword [esp + 0x50], 0x5ed03f2
mov dword [esp + 0x54], 0x9e2072b
mov dword [esp + 0x58], 0xdfe0beb
mov dword [esp + 0x5c], 0x11330fef
mov dword [esp + 0x60], 0x15f01330
mov dword [esp + 0x64], 0x19e117e5
mov dword [esp + 0x68], 0x1dfe1bf6
mov dword [esp + 0x6c], 0x21ec1fff
mov dword [esp + 0x70], 0x251d23db
mov word [esp + 0x74], 0x2724
mov word [esp + 0x7a], 0
mov dword [esp + 0x76], 0
mov eax, 0xb6721d8d
nop
movzx edx, byte [esp + eax + 0x498de28f]
lea ecx, [eax + 0x24000000]
lea esi, [edx + edx]
not esi
add esi, edx
and esi, 0x7da81a9
and edx, 0x56
or edx, esi
mov esi, eax
and esi, 0x25201a9
or esi, 0xc8213804
and ecx, 0xd8201e56
xor ecx, esi
xor ecx, edx
lea edx, [ecx + ecx]
and edx, 0x7c
xor edx, 0x58
xor ecx, 0x93
add ecx, edx
add cl, 0xad
mov byte [esp + eax + 0x498de28f], cl
inc eax
cmp eax, 0xb6721ded
jne 0x40dd70
movzx eax, word [esp + 0x1c]
test ax, ax
mov ebp, dword [esp + 0x18]
je 0x40de01
lea edi, [esp + 0x7c]
lea ecx, [esp + 0x1e]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], ax
add edi, 2
movzx eax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ddf0
mov word [edi], 0
and ebp, 7
mov eax, dword [esp + 0x14]
sub eax, ebp
lea edx, [eax*2 + 0x20]
xor eax, eax
xor ecx, ecx
nop
nop
nop
nop
nop
nop
movsx esi, byte [ebx + ecx + 0x60]
mov word [edi + eax], si
movsx esi, byte [ebx + ecx + 0x61]
mov word [edi + eax + 2], si
movsx esi, byte [ebx + ecx + 0x62]
mov word [edi + eax + 4], si
movsx esi, byte [ebx + ecx + 0x63]
mov word [edi + eax + 6], si
movsx esi, byte [ebx + ecx + 0x64]
mov word [edi + eax + 8], si
movsx esi, byte [ebx + ecx + 0x65]
mov word [edi + eax + 0xa], si
movsx esi, byte [ebx + ecx + 0x66]
mov word [edi + eax + 0xc], si
movsx esi, byte [ebx + ecx + 0x67]
mov word [edi + eax + 0xe], si
add ecx, 8
add eax, 0x10
cmp edx, eax
jne 0x40de20
test ebp, ebp
je 0x40de9e
neg eax
nop
movsx edx, byte [ebx + ecx + 0x60]
mov word [edi + ecx*2], dx
inc ecx
add eax, 0xfffffffe
dec ebp
jne 0x40de80
sub edi, eax
lea ecx, [edi - 2]
jmp 0x40dea6
mov bl, 1
jmp 0x40df5b
lea ecx, [edi + eax]
add ecx, 0xfffffffe
add edi, eax
mov word [edi], 0xd
mov dword [ecx + 4], 0xa
mov eax, dword [ebx + 0x80]
mov dword [esp + 0x1c], 0x29cd2bf5
mov dword [esp + 0x20], 0x2dc12fb8
mov word [esp + 0x24], 0xd32c
mov dword [esp + 0x26], 0
mov word [esp + 0x2a], 0
mov ecx, 0xcee669f7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + ecx + 0x31199625]
mov ebx, edx
and ebx, ecx
add bl, bl
sub dl, bl
movzx edx, dl
add edx, ecx
add dl, 0x2d
mov byte [esp + ecx + 0x31199625], dl
inc ecx
cmp ecx, 0xcee66a07
jne 0x40def0
lea ecx, [esp + 0x7c]
push 0x493e0
push eax
mov esi, dword [esp + 8]
push esi
push 0
push 0
push ecx
lea eax, [esp + 0x34]
push eax
call fcn.004101e0
add esp, 0x1c
mov ebx, eax
push esi
call fcn.0040c890
add esp, 4
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x80]
add dword [ecx + 4], eax
mov dword [ecx + 0x80], 0
mov eax, ebx
add esp, 0x118
pop esi
pop edi
pop ebx
pop ebp
ret