Function at 0x413430
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x30]
call fcn.0040f54c
xor edx, edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], edx
cmp esi, 0x8000
jle 0x413357
mov ecx, 0x8000
jmp 0x413359
mov ecx, esi
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x28]
call fcn.00410128
lea eax, [ebx + 0x4c00]
call fcn.0040b22c
test byte [ebp - 4], 0x80
je 0x413394
lea eax, [ebp - 0x30]
call fcn.0040c298
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x41338f
mov eax, ebx
call fcn.00414268
jmp 0x41339d
dec dword [ebp - 0xc]
jmp 0x41339d
mov edx, dword [ebx + 0x4c58]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebx + 0x4c38]
ja 0x4133b3
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebx + 0x4c50]
jbe 0x4133c9
xor eax, eax
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
mov edx, dword [ebp - 0xc]
mov dword [ebx + 0x4c58], edx
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebx + 0x4c38]
sete al
and eax, 1
mov byte [ebp - 0xd], al
push 0x64
call fcn.00410358
pop ecx
mov edi, eax
test eax, eax
je 0x413415
lea esi, [edi + 0x14]
mov eax, esi
call fcn.004138b4
lea eax, [esi + 0x14]
call fcn.00403a0c
lea eax, [esi + 0x20]
call fcn.00403a0c
xor edx, edx
mov ecx, edi
mov dword [esi + 0xc], edx
jmp 0x413417
mov ecx, edi
cmp byte [ebp - 0xd], 0
mov esi, ecx
je 0x4134c2
cmp dword [ebp - 0xc], 0x400
jbe 0x413442
xor eax, eax
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
lea eax, [ebx + 0x4c34]
mov edx, 1
call fcn.004138c4
push 0x64
call fcn.00410358
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x413488
mov edi, dword [ebp - 0x18]
add edi, 0x14
mov eax, edi
call fcn.004138b4
lea eax, [edi + 0x14]
call fcn.00403a0c
lea eax, [edi + 0x20]
call fcn.00403a0c
xor edx, edx
mov dword [edi + 0xc], edx
mov ecx, dword [ebp - 0x18]
jmp 0x41348b
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebx + 0x4c34]
mov edx, dword [ebx + 0x4c38]
mov dword [eax + edx*4 - 4], ecx
mov eax, dword [ebx + 0x4c38]
dec eax
mov dword [esi + 0x10], eax
lea eax, [ebx + 0x4c4c]
mov edx, 1
call fcn.00410624
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov dword [ecx + 8], eax
jmp 0x4134dd
mov edx, dword [ebx + 0x4c34]
mov ecx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x10], edx
mov ecx, dword [ebp - 0x14]
inc dword [ecx + 8]
xor edx, edx
xor eax, eax
jmp 0x413519
mov ecx, dword [ebx + 0x4c40]
push dword [ecx + eax*4]
mov ecx, eax
sub ecx, edx
mov edi, dword [ebx + 0x4c40]
lea edi, [edi + ecx*4]
pop ecx
mov dword [edi], ecx
mov ecx, dword [ebx + 0x4c40]
cmp dword [ecx + eax*4], 0
jne 0x413509
inc edx
test edx, edx
jle 0x413518
mov ecx, dword [ebx + 0x4c40]
xor edi, edi
mov dword [ecx + eax*4], edi
inc eax
cmp eax, dword [ebx + 0x4c44]
jl 0x4134e3
test edx, edx
jne 0x41353a
lea eax, [ebx + 0x4c40]
mov edx, 1
call fcn.004138c4
mov edx, 1
mov eax, dword [ebx + 0x4c44]
mov ecx, dword [ebx + 0x4c40]
sub eax, edx
mov dword [ecx + eax*4], esi
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 8]
lea eax, [ebp - 0x30]
mov dword [esi + 8], edx
call fcn.0040c298
test byte [ebp - 4], 0x40
mov edi, eax
je 0x41356a
add edi, 0x102
mov eax, dword [ebx + 0x55b0]
add eax, edi
and eax, 0x3fffff
mov dword [esi], eax
test byte [ebp - 4], 0x20
je 0x41358c
lea eax, [ebp - 0x30]
call fcn.0040c298
mov dword [esi + 4], eax
jmp 0x4135aa
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebx + 0x4c50]
jae 0x4135a5
mov ecx, dword [ebx + 0x4c4c]
mov eax, dword [ebp - 0xc]
mov edx, dword [ecx + eax*4]
jmp 0x4135a7
xor edx, edx
mov dword [esi + 4], edx
mov edx, dword [ebx + 0x55b0]
mov eax, dword [ebx + 0x55b4]
cmp edx, eax
je 0x4135c5
sub eax, edx
and eax, 0x3fffff
cmp edi, eax
jae 0x4135c9
xor ecx, ecx
jmp 0x4135ce
mov ecx, 1
mov byte [esi + 0xc], cl
mov eax, dword [ebx + 0x4c4c]
mov edx, dword [ebp - 0xc]
mov ecx, dword [esi + 4]
mov dword [eax + edx*4], ecx
lea eax, [esi + 0x40]
mov ecx, 0x1c
xor edx, edx
call fcn.00410114
mov dword [esi + 0x4c], 0x3c000
mov eax, dword [esi + 4]
mov dword [esi + 0x50], eax
mov edx, dword [esi + 8]
mov dword [esi + 0x54], edx
test byte [ebp - 4], 0x10
je 0x413645
lea eax, [ebp - 0x30]
call fcn.0040f5a0
shr eax, 9
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x30]
mov edx, 7
call fcn.0040f58c
xor edi, edi
mov ecx, edi
mov eax, 1
shl eax, cl
and eax, dword [ebp - 0x1c]
je 0x41363f
lea eax, [ebp - 0x30]
call fcn.0040c298
mov dword [esi + edi*4 + 0x40], eax
inc edi
cmp edi, 7
jl 0x413625
cmp byte [ebp - 0xd], 0
je 0x41370f
lea eax, [ebp - 0x30]
call fcn.0040c298
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x10000
jae 0x413669
cmp dword [ebp - 0x20], 0
jne 0x41367f
xor eax, eax
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
call fcn.0040e6e8
xor edi, edi
jmp 0x4136e5
mov eax, dword [ebp - 0x30]
add eax, 3
cmp eax, 0x8000
setge dl
and edx, 1
test dl, dl
je 0x4136c6
xor eax, eax
push eax
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00403a1c
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
lea eax, [ebp - 0x30]
call fcn.0040f5a0
shr eax, 8
mov edx, dword [ebp - 0x3c]
mov byte [edx + edi], al
lea eax, [ebp - 0x30]
mov edx, 8
call fcn.0040f58c
inc edi
cmp edi, dword [ebp - 0x20]
jb 0x41368e
mov ecx, dword [ebp - 0x14]
add ecx, 0x14
push ecx
lea eax, [ebx + 0x4c00]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x3c]
call fcn.0040be7c
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00403a1c
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x14]
mov dword [esi + 0x20], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x24]
mov dword [esi + 0x24], ecx
mov eax, dword [ebp - 0x14]
mov edi, dword [eax + 0x38]
test edi, edi
jle 0x41374d
cmp edi, 0x2000
jge 0x41374d
lea eax, [esi + 0x34]
mov edx, edi
call fcn.00407548
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x34]
mov ecx, edi
mov eax, dword [esi + 0x34]
call fcn.00410128
cmp dword [esi + 0x2c], 0x40
jge 0x413768
lea eax, [esi + 0x28]
call fcn.00408d94
lea eax, [esi + 0x28]
mov edx, 0x40
call fcn.00407548
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0x24], ecx
xor edi, edi
mov edx, edi
mov ecx, dword [esi + edi*4 + 0x40]
shl edx, 2
lea eax, [ebx + 0x4c00]
add edx, dword [ebp - 0x24]
call fcn.0040b248
inc edi
cmp edi, 7
jl 0x413770
mov edx, dword [ebp - 0x24]
lea edi, [ebx + 0x4c00]
mov eax, edi
add edx, 0x1c
mov ecx, dword [esi + 4]
call fcn.0040b248
mov edx, dword [ebp - 0x24]
add edx, 0x20
mov eax, edi
xor ecx, ecx
call fcn.0040b248
mov edx, dword [ebp - 0x24]
add edx, 0x2c
mov eax, edi
mov ecx, dword [esi + 8]
call fcn.0040b248
mov eax, dword [ebp - 0x24]
add eax, 0x30
mov ecx, 0x10
xor edx, edx
call fcn.00410114
test byte [ebp - 4], 8
je 0x413899
mov eax, dword [ebp - 0x30]
add eax, 3
cmp eax, 0x8000
setge dl
and edx, 1
test dl, dl
je 0x413809
xor eax, eax
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
lea eax, [ebp - 0x30]
call fcn.0040c298
mov edi, eax
cmp edi, 0x1fc0
jbe 0x41382e
xor eax, eax
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
mov eax, dword [esi + 0x2c]
lea edx, [edi + 0x40]
cmp eax, edx
jae 0x413845
lea edx, [edi + 0x40]
sub edx, eax
lea eax, [esi + 0x28]
call fcn.00407548
mov ecx, dword [esi + 0x28]
add ecx, 0x40
mov esi, ecx
xor ebx, ebx
jmp 0x413895
mov eax, dword [ebp - 0x30]
add eax, 3
cmp eax, 0x8000
setge dl
and edx, 1
test dl, dl
je 0x413879
xor eax, eax
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
jmp 0x4138aa
lea eax, [ebp - 0x30]
call fcn.0040f5a0
shr eax, 8
mov byte [esi + ebx], al
lea eax, [ebp - 0x30]
mov edx, 8
call fcn.0040f58c
inc ebx
cmp edi, ebx
ja 0x413851
mov al, 1
push eax
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0040f564
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4