Function at 0x402338
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov edx, dword [eax + 0x2ec]
push edi
cmp edx, ecx
jne 0x402958
mov esi, dword [ebp + 0xc]
cmp esi, dword [eax + 0x2e8]
jne 0x402958
mov ebx, dword [eax + 0x2e4]
cmp ecx, 3
jl 0x402958
cmp ecx, 4
jle 0x4023b7
cmp ecx, 5
je 0x4023a0
cmp ecx, 6
jne 0x402958
mov dword [ebp + 0xc], 0x4011ea
mov dword [ebp - 0x14], 0x40122f
mov dword [ebp - 0x18], 0x4010a2
jmp 0x4023cc
mov dword [ebp + 0xc], 0x4011d3
mov dword [ebp - 0x14], 0x401218
mov dword [ebp - 0x18], 0x401063
jmp 0x4023cc
mov dword [ebp + 0xc], 0x4011bc
mov dword [ebp - 0x14], 0x401201
mov dword [ebp - 0x18], 0x401000
cmp esi, 0xc
ja case.0x4023d5.2
jmp dword [esi*4 + 0x402960]
cmp dword [ebp + 0x14], 0
je case.0x4023d5.2
mov eax, dword [ebp + 0x20]
lea ecx, [ebx - 1]
mov eax, dword [eax]
cmp eax, ecx
ja 0x402958
test eax, eax
jbe 0x402410
mov esi, dword [ebp + 0x18]
mov ecx, eax
mov edx, ecx
lea edi, [ebp - 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [ebp + 0x14]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004037a4
add esp, 0x10
test eax, eax
je 0x40243f
push dword [ebp + 0x1c]
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
call dword [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebp + 0x20]
mov dword [eax], ebx
jmp case.0x4023d5.2
mov eax, dword [ebp + 0x20]
and dword [eax], 0
jmp case.0x4023d5.2
cmp dword [ebp + 0x14], 0
je case.0x4023d5.2
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x10]
call dword [ebp - 0x14]
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.004038ae
mov esi, dword [ebp + 0x20]
add esp, 0x18
cmp eax, ebx
mov dword [esi], eax
ja 0x402958
xor edi, edi
test eax, eax
jbe case.0x4023d5.2
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x10]
sub ecx, eax
mov dl, byte [ecx + eax]
inc edi
mov byte [eax], dl
inc eax
cmp edi, dword [esi]
jb 0x402490
jmp case.0x4023d5.2
cmp dword [ebp + 0x14], 0
je case.0x4023d5.2
mov esi, dword [ebp + 0x20]
lea ecx, [ebx - 1]
mov eax, dword [esi]
cmp eax, ecx
ja 0x402958
push eax
lea eax, [ebp - 0x10]
push dword [ebp + 0x18]
push eax
call fcn.004074b0
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push ebx
push dword [esi]
push eax
call fcn.004037a4
add esp, 0x1c
test eax, eax
je 0x402526
mov eax, dword [ebp + 0x10]
xor edi, edi
add eax, 0x2d0
test ebx, ebx
mov dword [ebp + 0x20], eax
jbe 0x402503
mov ecx, eax
lea eax, [ebp - 0x10]
sub ecx, eax
lea eax, [ebp + edi - 0x10]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc edi
cmp edi, ebx
jb 0x4024f5
push dword [ebp + 0x1c]
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
call dword [ebp + 0xc]
push ebx
push dword [ebp + 0x1c]
push dword [ebp + 0x20]
call fcn.004074b0
add esp, 0x18
mov dword [esi], ebx
jmp case.0x4023d5.2
and dword [esi], 0
jmp case.0x4023d5.2
cmp dword [ebp + 0x14], 0
je case.0x4023d5.2
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x18]
push esi
call dword [ebp - 0x14]
add esp, 0xc
xor eax, eax
test ebx, ebx
jbe 0x40255f
mov cl, byte [esi + eax + 0x2d0]
xor byte [ebp + eax - 0x10], cl
inc eax
cmp eax, ebx
jb 0x40254f
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.004038ae
mov esi, dword [ebp + 0x20]
add esp, 0xc
cmp eax, ebx
mov dword [esi], eax
ja 0x402958
xor edi, edi
test eax, eax
jbe case.0x4023d5.2
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x10]
sub ecx, eax
mov dl, byte [eax + ecx]
inc edi
mov byte [eax], dl
inc eax
cmp edi, dword [esi]
jb 0x40258e
jmp case.0x4023d5.2
cmp dword [ebp + 0x14], 0
je 0x402617
mov eax, dword [ebp + 0x20]
lea ecx, [ebx - 1]
mov eax, dword [eax]
cmp eax, ecx
ja 0x402958
test eax, eax
jbe 0x4025ce
mov esi, dword [ebp + 0x18]
mov ecx, eax
mov edx, ecx
lea edi, [ebp - 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [ebp + 0x14]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004037a4
add esp, 0x10
test eax, eax
je 0x402617
mov ecx, dword [ebp + 0x10]
xor esi, esi
test ebx, ebx
jbe 0x402605
lea edi, [ecx + 0x2d0]
lea eax, [ebp - 0x10]
sub edi, eax
lea eax, [ebp + esi - 0x10]
mov dl, byte [edi + eax]
xor byte [eax], dl
inc esi
cmp esi, ebx
jb 0x4025f7
lea eax, [ecx + 0x2d0]
push eax
lea eax, [ebp - 0x10]
push eax
push ecx
call dword [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebp + 0x10]
add eax, 0x2d0
jmp 0x402768
test edx, edx
jne 0x402958
cmp dword [ebp + 0x14], 0x7a4
jne 0x402958
mov eax, dword [ebp + 0x20]
lea ecx, [ebx - 1]
mov eax, dword [eax]
cmp eax, ecx
ja 0x402958
test eax, eax
jbe 0x402663
mov esi, dword [ebp + 0x18]
mov ecx, eax
mov edx, ecx
lea edi, [ebp - 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x7a4
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004037a4
mov esi, dword [ebp + 0x10]
add esp, 0x10
test eax, eax
je 0x4026ae
xor edi, edi
test ebx, ebx
jbe 0x40269c
lea ecx, [esi + 0x2d0]
lea eax, [ebp - 0x10]
sub ecx, eax
lea eax, [ebp + edi - 0x10]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc edi
cmp edi, ebx
jb 0x40268e
lea eax, [esi + 0x2d0]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
call dword [ebp + 0xc]
add esp, 0xc
lea edi, [esi + 0x2d0]
lea eax, [esi + 0x80]
push edi
push edi
push eax
call dword [ebp - 0x14]
push edi
push edi
push esi
call dword [ebp + 0xc]
push ebx
push edi
push dword [ebp + 0x1c]
call fcn.004074b0
add esp, 0x24
jmp 0x402435
test edx, edx
jne 0x402958
cmp dword [ebp + 0x14], 0x7a4
jne 0x402958
mov eax, dword [ebp + 0x20]
lea ecx, [ebx - 1]
mov eax, dword [eax]
cmp eax, ecx
ja 0x402958
test eax, eax
jbe 0x402717
mov esi, dword [ebp + 0x18]
mov ecx, eax
mov edx, ecx
lea edi, [ebp - 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x7a4
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004037a4
mov esi, dword [ebp + 0x10]
add esp, 0x10
test eax, eax
je 0x402762
xor edi, edi
test ebx, ebx
jbe 0x402750
lea ecx, [esi + 0x2d0]
lea eax, [ebp - 0x10]
sub ecx, eax
lea eax, [ebp + edi - 0x10]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc edi
cmp edi, ebx
jb 0x402742
lea eax, [esi + 0x2d0]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
call dword [ebp + 0xc]
add esp, 0xc
lea eax, [esi + 0x2d0]
push ebx
push eax
push dword [ebp + 0x1c]
call fcn.004074b0
jmp 0x402432
test edx, edx
je 0x402784
cmp edx, 1
jne 0x402958
mov edi, dword [ebp + 0x20]
lea eax, [ebp - 0x28]
push dword [edi]
push dword [ebp + 0x18]
push eax
call fcn.004074b0
mov eax, dword [edi]
add esp, 0xc
push 7
mov byte [ebp + eax - 0x28], 0x80
pop esi
sub esi, eax
jns 0x4027a9
add esi, 8
cmp esi, 1
jb 0x4027c7
mov ecx, esi
lea edi, [ebp + eax - 0x27]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x10]
mov ecx, dword [edi]
push 4
push 0
mov eax, dword [eax + 0x2e0]
add eax, ecx
add ecx, esi
shl eax, 3
mov dword [ebp + 0x14], eax
mov eax, dword [0x412274]
movzx edx, byte [eax + 3]
mov dl, byte [ebp + edx + 0x14]
mov byte [ebp + ecx - 0x23], dl
movzx edx, byte [eax + 2]
mov dl, byte [ebp + edx + 0x14]
mov byte [ebp + ecx - 0x22], dl
movzx edx, byte [eax + 1]
mov dl, byte [ebp + edx + 0x14]
mov byte [ebp + ecx - 0x21], dl
movzx eax, byte [eax]
mov al, byte [ebp + eax + 0x14]
mov byte [ebp + ecx - 0x20], al
lea eax, [ebp + ecx - 0x27]
push eax
call fcn.004077f0
mov eax, dword [edi]
lea eax, [eax + esi + 9]
mov esi, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x28]
push dword [ebp + 0x1c]
push eax
push esi
push 9
push dword [ebp + 8]
call fcn.00401e32
add esp, 0x24
test eax, eax
jne 0x40295b
mov eax, 0xf0f0f0f0
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x128]
push eax
call dword [ebp - 0x18]
pop ecx
lea edi, [ebp - 0x128]
pop ecx
mov eax, esi
sub edi, esi
mov ecx, 0x100
mov dl, byte [edi + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x402870
push dword [ebp + 0x1c]
lea eax, [esi + 0x2d0]
push eax
push esi
jmp 0x40242f
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax]
test ecx, ecx
jbe case.0x4023d5.2
mov esi, dword [ebp + 0x18]
mov eax, ecx
lea edi, [ebp - 0x10]
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
and ecx, 3
push dword [ebp + 0x10]
rep movsb byte es:[edi], byte [esi]
push 4
push dword [ebp + 8]
call fcn.00401e32
xor esi, esi
add esp, 0x18
cmp eax, esi
jne 0x40295b
mov eax, dword [ebp + 0x20]
cmp dword [eax], esi
jbe case.0x4023d5.2
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x10]
sub ecx, eax
mov dl, byte [ecx + eax]
inc esi
mov byte [eax], dl
mov edx, dword [ebp + 0x20]
inc eax
cmp esi, dword [edx]
jb 0x4028dc
jmp case.0x4023d5.2
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax]
test ecx, ecx
jbe case.0x4023d5.2
mov esi, dword [ebp + 0x18]
mov eax, ecx
lea edi, [ebp - 0x10]
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
and ecx, 3
push dword [ebp + 0x10]
rep movsb byte es:[edi], byte [esi]
push 5
push dword [ebp + 8]
call fcn.00401e32
xor edi, edi
add esp, 0x18
cmp eax, edi
jne 0x40295b
mov esi, dword [ebp + 0x20]
cmp dword [esi], edi
jbe case.0x4023d5.2
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x10]
sub ecx, eax
mov dl, byte [ecx + eax]
inc edi
mov byte [eax], dl
inc eax
cmp edi, dword [esi]
jb 0x402937
push 0x2d0
push 0
push dword [ebp + 0x10]
call fcn.004077f0
add esp, 0xc
xor eax, eax
jmp 0x40295b
push 0x20
pop eax
pop edi
pop esi
pop ebx
leave
ret