Function at 0x41d310
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov dword [esp + 0x14], 0
mov dword [esp + 4], 0x74757677
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 3
ja 0x41d36e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 4]
add eax, 0xda2d5b14
xor eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
add al, 0x9c
mov ecx, dword [esp]
mov byte [esp + ecx + 4], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 4
jb 0x41d340
mov eax, dword [esp + 4]
mov ecx, dword [0x442de0]
test ecx, ecx
je 0x41d3c4
xor edx, edx
mov esi, dword [0x442de4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [esi + edx*8], 0xcecd21fd
je 0x41d3a0
inc edx
cmp ecx, edx
jne 0x41d390
jmp 0x41d3c4
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x41d3c4
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 5
push 4
push dword [0x442de8]
push ecx
call fcn.00435090
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x41d460
push dword [esp + 0x14]
call fcn.00433110
add esp, 4
mov ebp, eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 4], 0x74757677
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 3
ja 0x41d42e
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 4]
add eax, 0xda2d5b14
xor eax, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
add al, 0x9c
mov edx, dword [esp]
mov byte [esp + edx + 4], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 4
jb 0x41d400
mov eax, dword [esp + 4]
mov edx, dword [0x442de0]
test edx, edx
je 0x41d486
xor esi, esi
mov edi, dword [0x442de4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0xcecd21fd
je 0x41d467
inc esi
cmp edx, esi
jne 0x41d450
jmp 0x41d486
xor ebx, ebx
jmp 0x41d760
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
je 0x41d486
push 0
push ecx
push ebp
push 5
push 4
push dword [0x442de8]
push edx
call fcn.00435090
add esp, 0x1c
xor ebx, ebx
test eax, eax
js 0x41d757
mov edi, dword [ebp]
mov eax, edi
mov ecx, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea edx, [ecx + eax]
dec ebx
mov eax, dword [ecx + eax]
mov ecx, edx
test eax, eax
jne 0x41d4a0
mov eax, ebx
neg eax
dec ebx
and ebx, 0x104
mov ecx, eax
and ecx, 0xfffffefb
imul ecx, ebx
mov edx, eax
and edx, 0x104
or eax, 0x104
imul eax, edx
add eax, ecx
mov dword [esp + 0x10], ebp
jns 0x41d4e2
mov eax, 0xffffffff
jmp 0x41d4e4
add eax, eax
push eax
call fcn.00408f60
add esp, 4
mov ebp, eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
jmp 0x41d512
mov esi, ebp
add eax, edi
lea ebp, [esi + 2]
mov word [esi], 0xa
mov edi, dword [eax]
test edi, edi
je 0x41d543
mov ecx, dword [eax + edi + 0x3c]
movzx edx, word [ecx]
test dx, dx
je 0x41d500
add ecx, 2
mov esi, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], dx
add esi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41d530
jmp 0x41d502
xor ebx, ebx
mov eax, dword [esp + 8]
cmp ebp, eax
je 0x41d74a
mov word [ebp], 0
movzx ecx, word [eax]
test cx, cx
je 0x41d5a4
xor ebx, ebx
mov eax, dword [esp + 8]
jmp 0x41d57e
add ebx, edx
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x41d5a4
cmp eax, ebp
jae 0x41d5a4
movzx edi, cx
cmp edi, 0x800
mov ecx, 3
sbb ecx, 0
mov edx, 1
cmp edi, 0x80
jb 0x41d570
mov edx, ecx
jmp 0x41d570
lea eax, [ebx + 1]
mov dword [esp + 0x18], eax
push eax
call fcn.00408f60
add esp, 4
mov edx, eax
mov dword [esp + 0xc], eax
test ebx, ebx
jle 0x41d6a5
mov edx, dword [esp + 0xc]
cmp dword [esp + 8], ebp
jae 0x41d6a5
mov edx, dword [esp + 0xc]
lea eax, [edx + ebx]
mov dword [esp + 0x34], eax
add dword [esp + 0x18], edx
mov ebp, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp]
test cx, cx
je 0x41d6a5
cmp cx, 0x7f
ja 0x41d610
mov byte [edx], cl
mov edi, 1
jmp 0x41d690
mov eax, edx
not eax
add eax, dword [esp + 0x18]
movzx edi, cx
cmp eax, 2
jb 0x41d650
cmp edi, 0x7ff
ja 0x41d650
mov eax, ecx
shr eax, 6
add al, 0xc0
mov byte [edx], al
and cl, 0x3f
or cl, 0x80
mov byte [edx + 1], cl
mov edi, 2
jmp 0x41d690
mov dword [esp + 0x30], edi
xor edi, edi
cmp eax, 3
jb 0x41d690
mov edi, dword [esp + 0x30]
mov eax, edi
shr eax, 0xc
or al, 0xe0
mov byte [edx], al
mov eax, edi
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [edx + 1], al
and cl, 0x3f
or cl, 0x80
mov byte [edx + 2], cl
mov edi, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add edx, edi
cmp edx, dword [esp + 0x34]
jae 0x41d6a5
lea eax, [ebp + 2]
cmp ebp, esi
mov ebp, eax
jb 0x41d5f0
mov byte [edx], 0
mov dword [esp + 0x1c], 0x70656340
mov dword [esp + 0x20], 0x525d5e51
mov dword [esp + 0x24], 0x23269f5b
mov word [esp + 0x28], 0xa528
mov dword [esp + 0x2a], 0
mov byte [esp + 0x2e], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 0x12
ja 0x41d721
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x1c]
add eax, 0xa48069dc
xor eax, ecx
mov dword [esp], eax
mov eax, dword [esp]
add al, 0xb4
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x1c], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 0x13
jb 0x41d6f0
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
push ebx
mov esi, dword [esp + 0x10]
push esi
push eax
call fcn.00409910
mov ebx, eax
push esi
call fcn.00408f70
add esp, 4
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 8]
jmp 0x41d74e
mov ebp, dword [esp + 0x10]
push eax
call fcn.00408f70
add esp, 4
push ebp
call fcn.00433180
add esp, 4
mov eax, ebx
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret