Function at 0x40330c
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0x7c3824]
xor eax, esp
mov dword [esp + 0x1c], eax
mov dword [esp + 0xc], ecx
cmp dword [ecx], 0
jle 0x4035a2
mov esi, dword [esp + 0x34]
xor edi, edi
xor eax, eax
mov ecx, dword [esi + eax*4]
mov cl, byte [ecx + edi]
mov byte [esp + eax + 0x18], cl
inc eax
cmp eax, 4
jne 0x403333
mov dword [esp + 0x10], edi
xor ebx, ebx
mov ch, byte [esp + 0x18]
mov cl, ch
xor edx, edx
test cl, 1
je 0x403378
mov edi, edx
mov dl, 2
test ebx, ebx
je 0x403374
mov esi, ebx
mov eax, edx
add al, dl
movzx ebp, al
xor al, 0x1b
test dl, dl
movzx edx, al
cmovns edx, ebp
dec esi
jne 0x403360
mov eax, edi
xor dl, al
shr cl, 1
inc ebx
cmp ebx, 8
jne 0x403351
mov edi, edx
xor ebx, ebx
mov cl, byte [esp + 0x19]
mov byte [esp + 3], cl
mov dword [esp + 8], 0
test cl, 1
je 0x4033bd
mov dl, 3
test ebx, ebx
je 0x4033b5
mov esi, ebx
mov eax, edx
add al, dl
movzx ebp, al
xor al, 0x1b
test dl, dl
movzx edx, al
cmovns edx, ebp
dec esi
jne 0x4033a1
xor dl, byte [esp + 8]
mov dword [esp + 8], edx
shr cl, 1
inc ebx
cmp ebx, 8
jne 0x403394
mov eax, dword [esp + 8]
mov edx, edi
xor al, dl
mov dl, byte [esp + 0x1a]
mov cl, byte [esp + 0x1b]
mov byte [esp + 2], dl
xor al, dl
mov byte [esp + 1], cl
xor al, cl
mov dword [esp + 8], eax
xor ebx, ebx
mov dl, byte [esp + 3]
xor eax, eax
mov byte [esp + 4], ch
test dl, 1
je 0x40341b
mov ecx, eax
mov al, 2
test ebx, ebx
je 0x403415
mov esi, ebx
mov dh, al
add dh, al
movzx ebp, dh
xor dh, 0x1b
test al, al
movzx eax, dh
cmovns eax, ebp
dec esi
jne 0x403400
xor al, cl
mov ch, byte [esp + 4]
shr dl, 1
inc ebx
cmp ebx, 8
jne 0x4033f1
mov dword [esp + 4], eax
xor ebp, ebp
mov dl, byte [esp + 2]
xor ebx, ebx
test dl, 1
je 0x403455
mov al, 3
test ebp, ebp
je 0x403451
mov esi, ebp
mov dh, al
add dh, al
movzx edi, dh
xor dh, 0x1b
test al, al
movzx eax, dh
cmovns eax, edi
dec esi
jne 0x40343c
xor al, bl
mov ebx, eax
shr dl, 1
inc ebp
cmp ebp, 8
jne 0x40342f
mov al, byte [esp + 1]
xor al, ch
xor al, byte [esp + 4]
xor al, bl
mov byte [esp + 0x15], al
xor esi, esi
mov dl, byte [esp + 2]
xor ebx, ebx
test dl, 1
je 0x40349d
mov ebp, ebx
mov bl, 2
test esi, esi
je 0x403499
mov eax, esi
mov dh, bl
add dh, bl
movzx edi, dh
xor dh, 0x1b
test bl, bl
movzx ebx, dh
cmovns ebx, edi
dec eax
jne 0x403484
mov eax, ebp
xor bl, al
shr dl, 1
inc esi
cmp esi, 8
jne 0x403475
mov dword [esp + 4], ebx
mov cl, byte [esp + 3]
xor cl, ch
xor esi, esi
mov dl, byte [esp + 1]
xor eax, eax
test dl, 1
je 0x4034dd
mov bl, 3
test esi, esi
je 0x4034d9
mov ebp, esi
mov dh, bl
add dh, bl
movzx edi, dh
xor dh, 0x1b
test bl, bl
movzx ebx, dh
cmovns ebx, edi
dec ebp
jne 0x4034c4
xor bl, al
mov eax, ebx
shr dl, 1
inc esi
cmp esi, 8
jne 0x4034b7
xor cl, byte [esp + 4]
xor cl, al
mov byte [esp + 0x16], cl
xor esi, esi
xor edx, edx
test ch, 1
je 0x40351a
mov ebp, edx
mov dl, 3
test esi, esi
je 0x403516
mov ebx, esi
mov eax, edx
add al, dl
movzx edi, al
xor al, 0x1b
test dl, dl
movzx edx, al
cmovns edx, edi
dec ebx
jne 0x403502
mov eax, ebp
xor dl, al
shr ch, 1
inc esi
cmp esi, 8
jne 0x4034f3
mov dword [esp + 4], edx
xor esi, esi
xor ebx, ebx
mov cl, byte [esp + 1]
test cl, 1
je 0x403553
mov dl, 2
test esi, esi
je 0x40354f
mov ebp, esi
mov eax, edx
add al, dl
movzx edi, al
xor al, 0x1b
test dl, dl
movzx edx, al
cmovns edx, edi
dec ebp
jne 0x40353b
xor dl, bl
mov ebx, edx
shr cl, 1
inc esi
cmp esi, 8
jne 0x40352e
mov al, byte [esp + 2]
xor al, byte [esp + 3]
xor al, byte [esp + 4]
xor al, bl
mov byte [esp + 0x17], al
mov esi, dword [esp + 0x34]
mov eax, dword [esi]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 8]
mov byte [eax + edi], bl
xor eax, eax
inc eax
mov cl, byte [esp + eax + 0x14]
mov edx, dword [esi + eax*4]
mov byte [edx + edi], cl
inc eax
cmp eax, 4
jne 0x403581
inc edi
mov eax, dword [esp + 0xc]
cmp edi, dword [eax]
jl 0x403331
mov byte [esp + 0x14], bl
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.005db451
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret 4