Function at 0x40d820
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc8
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0xcc]
imul eax, eax, 0x126
cmp dword [eax + 0x432bc8], 0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xe0]
mov dword [esp + 0x18], edi
jne 0x40d863
mov eax, 0xa2
jmp 0x40da8b
cmp word [esp + 0xe8], 0
jne 0x40d8be
push 0x80
lea ecx, [esp + 0x58]
push 0
push ecx
call fcn.0040fd40
mov eax, dword [esp + 0xf0]
add esp, 0xc
cmp ax, 0x77
jbe 0x40d894
mov eax, 0x77
movzx edx, ax
push edx
mov byte [esp + 0x5f], al
lea eax, [esp + 0x60]
push edi
push eax
mov byte [esp + 0x66], 0
call fcn.00411170
mov ecx, 0x20
lea esi, [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x1c]
push 0x19
push ecx
call fcn.0040a4f0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00410924
add esp, 4
call fcn.00410931
mov bl, al
mov al, byte [esp + 0xec]
xor al, bl
mov dword [esp + 0x14], 0
mov byte [esp + 0x13], al
mov ebp, edi
jmp 0x40d904
mov al, byte [esp + 0x13]
mov dl, byte [esp + 0x14]
mov ecx, dword [ebp + 4]
mov byte [esp + 0x20], al
mov eax, dword [ebp]
xor dl, bl
mov dword [esp + 0x21], eax
mov eax, dword [ebp + 0xc]
mov byte [esp + 0x1f], dl
mov edx, dword [ebp + 8]
mov dword [esp + 0x2d], eax
mov byte [esp + 0x1d], 0x32
mov byte [esp + 0x1e], bl
mov dword [esp + 0x25], ecx
mov dword [esp + 0x29], edx
xor eax, eax
lea esp, [esp]
xor byte [esp + eax + 0x21], bl
add eax, 1
cmp eax, 0x10
jl 0x40d940
sub esp, 0x1c
mov ecx, 6
lea esi, [esp + 0x38]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call fcn.0040a880
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x3c]
mov byte [esp + 0x54], al
mov eax, dword [esp + 0xfc]
push edx
push eax
call fcn.0040a6d0
add esp, 0x28
test eax, eax
jne 0x40daa6
mov eax, dword [esp + 0x14]
add eax, 1
add ebp, 0x10
cmp eax, 8
mov dword [esp + 0x14], eax
jl 0x40d900
mov al, byte [esp + 0xec]
mov cl, bl
xor cl, 8
mov byte [esp + 0x1f], cl
or al, 4
sub esp, 0x1c
xor al, bl
mov byte [esp + 0x3c], al
mov byte [esp + 0x39], 0x32
mov byte [esp + 0x3a], bl
mov ecx, 6
lea esi, [esp + 0x38]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call fcn.0040a880
mov ecx, dword [esp + 0xf8]
lea edx, [esp + 0x54]
mov byte [esp + 0x50], al
push edx
lea eax, [esp + 0x3c]
push eax
push ecx
call fcn.0040a6d0
mov ebp, dword [esp + 0x40]
add esp, 0x28
mov dword [esp + 0x14], 0
mov dl, byte [esp + 0x14]
mov al, byte [esp + 0x13]
add dl, 9
sub esp, 0x1c
xor dl, bl
mov byte [esp + 0x3b], dl
mov byte [esp + 0x3c], al
mov byte [esp + 0x39], 0x32
mov byte [esp + 0x3a], bl
mov ecx, 6
lea esi, [esp + 0x38]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call fcn.0040a880
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x3c]
mov byte [esp + 0x54], al
mov eax, dword [esp + 0xfc]
push edx
push eax
call fcn.0040a6d0
add esp, 0x28
test eax, eax
jne 0x40daa6
mov ecx, dword [esp + 0x3d]
mov edx, dword [esp + 0x41]
mov eax, dword [esp + 0x45]
mov dword [ebp], ecx
mov ecx, dword [esp + 0x49]
mov dword [ebp + 4], edx
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
add eax, 1
mov dword [ebp + 0xc], ecx
add ebp, 0x10
cmp eax, 8
mov dword [esp + 0x14], eax
jl 0x40da00
xor eax, eax
mov ecx, dword [esp + 0xd4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040fac6
add esp, 0xc8
ret 0x14
mov eax, 0x2d
jmp 0x40da8b