Function at 0x403390
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x580
lea eax, [esp + 0x38]
push ebx
push esi
push edi
push ebp
push 0x44
push eax
call fcn.00403370
mov edx, dword [esp + 0x59c]
mov ecx, dword [esp + 0x5a0]
add esp, 8
mov eax, edx
mov esi, dword [eax]
add eax, 4
inc dword [esp + esi*4 + 0x48]
dec ecx
jne 0x4033b9
mov eax, dword [esp + 0x598]
cmp eax, dword [esp + 0x48]
jne 0x4033fa
xor ax, ax
mov ecx, dword [esp + 0x5a8]
mov ebx, dword [esp + 0x5ac]
pop ebp
pop edi
mov dword [ecx], 0
pop esi
mov dword [ebx], 0
pop ebx
add esp, 0x580
ret
mov ebx, dword [esp + 0x5ac]
mov ecx, 1
mov eax, dword [ebx]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x4c]
cmp dword [eax], 0
jne 0x403424
add eax, 4
inc ecx
lea esi, [esp + 0x88]
cmp eax, esi
jbe 0x403410
mov dword [esp + 0x1c], ecx
mov esi, ecx
cmp dword [esp + 0x10], ecx
jae 0x403434
mov dword [esp + 0x10], esi
mov edi, 0x10
lea eax, [esp + 0x88]
cmp dword [eax], 0
jne 0x403451
sub eax, 4
dec edi
lea ebp, [esp + 0x48]
cmp eax, ebp
jne 0x403440
mov dword [esp + 0x30], edi
cmp dword [esp + 0x10], edi
jbe 0x40345f
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x10]
mov dword [ebx], eax
mov eax, 1
shl eax, cl
mov dword [esp + 0x20], eax
cmp ecx, edi
jae 0x403492
lea eax, [esp + ecx*4 + 0x48]
mov ebx, dword [eax]
sub dword [esp + 0x20], ebx
js 0x4034ad
add eax, 4
inc ecx
mov ebx, dword [esp + 0x20]
add ebx, ebx
cmp ecx, edi
mov dword [esp + 0x20], ebx
jb 0x403478
lea eax, [esp + edi*4 + 0x48]
mov ecx, dword [eax]
sub dword [esp + 0x20], ecx
jns 0x4034bc
mov ax, 0xfffb
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
mov ax, 0xfffb
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
add ecx, dword [esp + 0x20]
xor ebx, ebx
dec edi
mov dword [eax], ecx
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x94]
mov dword [esp + 0x90], ebx
je 0x4034e6
add ebx, dword [eax]
add eax, 4
mov dword [ecx], ebx
add ecx, 4
dec edi
jne 0x4034d9
xor edi, edi
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x403504
lea ecx, [esp + eax*4 + 0x8c]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [esp + eax*4 + 0x10c], edi
inc edi
cmp dword [esp + 0x598], edi
ja 0x4034e8
xor edx, edx
lea eax, [esp + 0x110]
mov dword [esp + 0x18], edx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0xd0], edx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x3c], edx
neg eax
mov dword [esp + 0x14], eax
cmp esi, dword [esp + 0x30]
mov dword [esp + 0x2c], 0xffffffff
jg 0x4037b4
mov eax, dword [esp + 0x1c]
lea ecx, [esp + eax*4 + 0x48]
mov dword [esp + 0x44], ecx
mov eax, dword [ecx]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
dec dword [esp + 0x34]
test eax, eax
je 0x4037a2
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jge 0x403685
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
shl esi, 2
inc eax
mov dword [esp + 0x40], eax
add esi, 4
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x30]
inc dword [esp + 0x2c]
add dword [esp + 0x14], eax
sub edi, dword [esp + 0x14]
cmp eax, edi
jae 0x4035ae
mov edi, eax
mov ebx, dword [esp + 0x1c]
mov edx, 1
sub ebx, dword [esp + 0x14]
mov cl, bl
shl edx, cl
cmp dword [esp + 0x40], edx
jae 0x4035e8
mov eax, dword [esp + 0x34]
inc ebx
inc eax
sub edx, eax
mov eax, dword [esp + 0x44]
cmp ebx, edi
jae 0x4035e8
mov ecx, dword [eax + 4]
add edx, edx
add eax, 4
cmp ecx, edx
jae 0x4035e8
sub edx, ecx
inc ebx
cmp ebx, edi
jb 0x4035d5
mov eax, 1
mov cl, bl
shl eax, cl
mov dword [esp + 0x3c], eax
lea ecx, [eax*8 + 8]
push ecx
call fcn.00402300
add esp, 4
test eax, eax
je 0x4037d1
lea edx, [eax + 8]
mov ecx, dword [esp + 0x5a8]
add eax, 4
mov dword [esp + esi + 0xd0], edx
mov dword [ecx], edx
mov dword [esp + 0x5a8], eax
mov dword [eax], 0
test esi, esi
je 0x403673
mov eax, dword [esp + 0x18]
mov cl, byte [esp + 0x10]
add bl, 0x10
mov dword [esp + esi + 0x8c], eax
mov byte [esp + 0x25], cl
mov byte [esp + 0x24], bl
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
sub cl, byte [esp + 0x10]
mov dword [esp + 0x28], edx
shr ebx, cl
shl ebx, 3
mov eax, dword [esp + 0x24]
add ebx, dword [esp + esi + 0xcc]
mov dword [ebx], eax
mov dword [ebx + 4], edx
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x1c]
jl 0x403591
mov bl, byte [esp + 0x14]
mov cl, byte [esp + 0x1c]
sub cl, bl
mov eax, dword [esp + 0x598]
mov byte [esp + 0x25], cl
lea ebp, [esp + eax*4 + 0x110]
cmp ebp, dword [esp + 0x38]
ja 0x4036ae
mov byte [esp + 0x24], 0x63
jmp 0x4036f9
mov eax, dword [esp + 0x38]
mov esi, dword [eax]
cmp dword [esp + 0x59c], esi
jbe 0x4036cd
mov al, 0x10
cmp esi, 0x100
adc al, 0xff
mov byte [esp + 0x24], al
jmp 0x4036ef
sub esi, dword [esp + 0x59c]
mov eax, dword [esp + 0x5a4]
add esi, esi
mov ebp, dword [esp + 0x5a0]
mov al, byte [esi + eax]
mov si, word [esi + ebp]
mov byte [esp + 0x24], al
add dword [esp + 0x38], 4
mov word [esp + 0x28], si
mov esi, 1
mov edi, dword [esp + 0x18]
shl esi, cl
mov cl, bl
shr edi, cl
cmp edi, dword [esp + 0x3c]
jae 0x403735
lea ecx, [edx + edi*8]
lea eax, [esi*8]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
add edi, esi
mov dword [ecx], eax
mov dword [ecx + 4], ebp
add ecx, dword [esp + 0x40]
cmp edi, dword [esp + 0x3c]
jb 0x40371c
mov eax, 1
mov cl, byte [esp + 0x1c]
dec cl
shl eax, cl
test dword [esp + 0x18], eax
je 0x403755
xor dword [esp + 0x18], eax
shr eax, 1
test dword [esp + 0x18], eax
jne 0x403748
mov cl, bl
xor dword [esp + 0x18], eax
mov eax, dword [esp + 0x2c]
lea esi, [esp + eax*4 + 0x8c]
mov eax, 1
shl eax, cl
dec eax
and eax, dword [esp + 0x18]
cmp eax, dword [esi]
je 0x40355f
sub esi, 4
mov eax, dword [esp + 0x10]
dec dword [esp + 0x2c]
sub dword [esp + 0x14], eax
mov eax, 1
mov cl, byte [esp + 0x14]
shl eax, cl
dec eax
and eax, dword [esp + 0x18]
cmp eax, dword [esi]
jne 0x40377a
jmp 0x40355f
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x30]
jle 0x40354d
cmp dword [esp + 0x20], 0
je 0x4037f7
cmp dword [esp + 0x30], 0
je 0x4037f7
mov ax, 0xfffc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
cmp dword [esp + 0x2c], 0
je 0x4037e8
mov eax, dword [esp + 0xd0]
push eax
call fcn.00403810
add esp, 4
mov ax, 0xfffa
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret
xor ax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x580
ret