Function at 0x415640
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edx + eax], 0
lea eax, [eax + 2]
jne 0x415660
lea ecx, [edx + eax]
add ecx, 0xfffffffe
add eax, edx
mov ebx, edx
mov edx, 1
sub edx, eax
and edx, ebx
not ebx
and ebx, ecx
sub ebx, edx
mov ebp, dword [edi + 4]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebp + eax], 0
lea eax, [eax + 2]
jne 0x415690
sar ebx, 1
lea ecx, [eax + ebp]
add ecx, 0xfffffffe
add eax, ebp
mov edx, 1
sub edx, eax
and edx, ebp
mov eax, ebp
not eax
and eax, ecx
sub eax, edx
sar eax, 1
lea ecx, [ebx + eax]
add ecx, 2
test ecx, ecx
jns 0x4156c9
mov eax, 0xffffffff
jmp 0x4156d2
add eax, ebx
lea eax, [eax*2 + 4]
push eax
call fcn.00408bf0
add esp, 4
movzx ecx, word [ebp]
mov dword [esp + 8], eax
test cx, cx
je 0x415702
add ebp, 2
mov eax, dword [esp + 8]
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebp]
add ebp, 2
test cx, cx
jne 0x4156f0
mov word [eax], 0
mov word [esp + 0x10], 0x558
xor ecx, ecx
mov edx, ecx
or dl, 0x24
xor dl, byte [esp + ecx + 0x10]
add dl, 0xe0
mov byte [esp + ecx + 0x10], dl
lea ecx, [ecx + ecx*2]
xor ecx, 1
cmp ecx, 2
jb 0x415710
movzx ecx, word [esp + 0x10]
mov word [eax], cx
add eax, 2
mov edx, dword [esp + 0x58]
movzx ecx, word [edx]
test cx, cx
je 0x415761
add edx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x415750
mov word [eax], 0
lea eax, [esp + 0xc]
push 0x60
push 7
push 0x120089
push eax
push dword [esp + 0x18]
call fcn.0043e120
add esp, 0x14
mov ecx, eax
mov esi, dword [esi]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [esi + eax], 0
lea eax, [eax + 2]
jne 0x415790
mov ebp, ebx
mov dword [esp + 0x24], ecx
lea ecx, [esi + eax]
add ecx, 0xfffffffe
add eax, esi
mov edx, 1
sub edx, eax
and edx, esi
mov eax, esi
not eax
and eax, ecx
sub eax, edx
mov edi, dword [edi]
xor ecx, ecx
nop
nop
nop
cmp word [edi + ecx], 0
lea ecx, [ecx + 2]
jne 0x4157c0
sar eax, 1
lea edx, [edi + ecx]
add edx, 0xfffffffe
add ecx, edi
mov ebx, 1
sub ebx, ecx
and ebx, edi
mov ecx, edi
not ecx
and ecx, edx
sub ecx, ebx
sar ecx, 1
add ebp, eax
lea eax, [ecx + ebp]
add eax, 3
test eax, eax
jns 0x4157fa
mov eax, 0xffffffff
jmp 0x415803
add ebp, ecx
lea eax, [ebp*2 + 6]
push eax
call fcn.00408bf0
add esp, 4
movzx ecx, word [esi]
mov ebp, eax
test cx, cx
je 0x415832
add esi, 2
mov ebp, eax
nop
nop
nop
nop
nop
mov word [ebp], cx
add ebp, 2
movzx ecx, word [esi]
add esi, 2
test cx, cx
jne 0x415820
mov dword [esp + 0x20], eax
mov word [ebp], 0
mov word [esp + 0x10], 0xa0f0
xor esi, esi
mov dl, 1
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + esi + 0x10]
mov ebx, 0xe8
sub ebx, esi
mov ecx, esi
add ecx, 0x8e015217
xor ebx, ecx
and ebx, eax
xor ebx, ecx
mov ecx, ebx
xor ecx, 0x94
and ebx, 0x6b
add ebx, ebx
sub ebx, ecx
add bl, 0xdc
mov byte [esp + esi + 0x10], bl
mov esi, 1
test dl, 1
mov edx, 0
jne 0x415850
movzx ecx, word [esp + 0x10]
mov word [ebp], cx
add ebp, 2
movzx ecx, word [edi]
test cx, cx
je 0x4158c2
add edi, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], cx
add ebp, 2
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x4158b0
mov word [ebp], 0
mov word [esp + 0x10], 0x254b
xor ecx, ecx
mov dl, 1
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + ecx + 0x10]
mov ebx, 0xf1d567fb
sub ebx, ecx
mov edi, ebx
and edi, esi
xor esi, 5
and edi, 0x5b
xor ebx, 0x5f
and ebx, esi
or ebx, edi
add bl, 0xe0
mov byte [esp + ecx + 0x10], bl
mov ecx, 1
test dl, 1
mov edx, 0
jne 0x4158e0
movzx ecx, word [esp + 0x10]
mov word [ebp], cx
add ebp, 2
mov eax, dword [esp + 0x58]
movzx ecx, word [eax]
test cx, cx
je 0x415954
add eax, 2
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x24]
nop
nop
nop
nop
nop
nop
mov word [ebp], cx
add ebp, 2
movzx ecx, word [eax]
add eax, 2
test cx, cx
jne 0x415940
jmp 0x415960
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x24]
mov word [ebp], 0
mov dword [esp + 0x10], 0xc1809f5d
xor eax, eax
mov ecx, eax
add cl, 0xee
xor cl, byte [esp + eax + 0x10]
add cl, 0x90
mov byte [esp + eax + 0x10], cl
inc eax
cmp eax, 4
jne 0x415970
xor eax, eax
cmp ebx, dword [esp + 0x10]
sete al
jmp dword [eax*4 + 0x222ed8]