Function at 0x4041ca
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x14]
push ebx
mov bl, byte [0x65cd2a]
push ebp
mov ebp, dword [esp + 0x30]
push esi
mov esi, dword [esp + 0x38]
mov edx, dword [0x65cd34]
push edi
mov ecx, dword [esi]
movzx eax, byte [ecx + eax]
mov ecx, dword [0x65cd3c]
mov dword [esp + 0x14], eax
mov eax, dword [0x65cd24]
mov edi, dword [ecx + 0x5938]
mov dword [esp + 0x10], edi
mov bh, byte [ebp + eax*2 + 0x4a]
mov eax, dword [0x65cd30]
or bh, al
inc bl
inc eax
mov dword [0x65cd30], eax
mov eax, dword [esp + 0x34]
mov byte [0x65cd2a], bl
mov eax, dword [eax]
movzx eax, word [ebp + eax*2]
sub eax, dword [0x65cd5c]
mov dword [esp + 0x34], eax
mov eax, dword [ecx + edx*8]
mov ecx, 0x7a4
mov dword [esp + 0x3c], eax
movzx eax, word [ebp]
add cx, word [esi + eax*4]
inc edx
movzx eax, bl
movzx esi, cx
movzx eax, word [ebp + eax*2 + 2]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
mov dword [0x65cd34], edx
movzx eax, word [eax + 0x2612]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
mov ecx, dword [eax*4 + 0x498]
movzx eax, byte [0x65cd2b]
cmp ecx, eax
jne 0x404375
mov edi, ecx
movzx ebp, bh
mov ebx, esi
xor ebx, ebp
lea ecx, [edi + 0xcc]
mov dword [esp + 0x24], ecx
mov eax, 0x1a02
or word [0x65cd38], ax
mov eax, ecx
cdq
mov ecx, 0x95
idiv ecx
imul eax, dword [ebp*4 + 0x42e]
mov dword [ebp*4 + 0x42e], eax
mov eax, ebx
movzx edx, byte [0x65cd2a]
xor eax, edi
mov ecx, dword [0x65cd4c]
sub eax, dword [ecx + edx*4]
mov dword [ecx + edx*4], eax
mov ecx, 0xe66
movzx eax, byte [0x65cd2b]
xor eax, edi
cdq
idiv ecx
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x3c]
mov dword [0x65cd48], edx
mov edx, dword [esp + 0x40]
inc byte [eax]
mov al, byte [eax]
movzx esi, al
mov eax, dword [esp + 0x30]
movzx ecx, word [ecx + esi*2 + 0x1e]
mov eax, dword [eax]
mov eax, dword [edx + eax*4 + 0x60]
cdq
idiv ecx
mov ecx, dword [esp + 0x3c]
mov word [ecx + esi*2 + 0x1e], ax
mov eax, 0xffff
mov cx, word [0x65cd2c]
add cx, ax
imul esi, dword [0x65cd54], 0xc
mov eax, dword [0x65cd48]
cdq
idiv edi
mov word [0x65cd2c], cx
movzx ecx, cx
xor eax, ecx
mov ecx, dword [esp + 0x34]
or dword [esi + ecx + 0x8c], eax
inc edi
mov ecx, dword [esp + 0x24]
movzx eax, byte [0x65cd2b]
inc ecx
mov dword [esp + 0x24], ecx
cmp edi, eax
je 0x40429e
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov esi, dword [0x65cd30]
movzx edx, bx
movzx ecx, byte [edx + eax]
add cx, word [0x65cd5c]
mov eax, dword [esp + 0x2c]
xor cx, word [eax + esi*4]
sub cx, word [edi + edx*2]
mov word [edi + edx*2], cx
imul ecx, dword [0x65cd54], 3
mov edx, dword [esp + 0x48]
mov al, byte [0x65cd2a]
cmp al, byte [ecx + edx]
je 0x404406
mov ecx, dword [esp + 0x28]
lea eax, [ebx - 1]
movzx edi, ax
xor edx, edx
mov eax, dword [esp + 0x30]
mov ebx, edi
mov ax, word [eax + ebx*4]
mov word [0x65cd40], ax
mov eax, dword [ecx]
movzx esi, word [ebp + edi*2 + 2]
mov eax, dword [ecx + eax*8 + 0x18]
div esi
mov esi, dword [esp + 0x18]
xor edx, edx
mov word [ebp + edi*2 + 2], ax
mov eax, 0x1a65
mov edi, dword [esp + 0x10]
dec dword [eax]
mov ecx, dword [eax]
mov eax, 0x12c6
div dword [esi + ebx*4]
add dword [ecx*4 + 0x4bc], edx
movzx eax, word [0x65cd40]
movzx eax, word [edi + eax*2]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret