Function at 0x415a40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov edi, dword [esp + 0x5c]
mov ebp, dword [esp + 0x58]
mov ecx, dword [ebp + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ecx + eax + 2], 0
lea eax, [eax + 2]
jne 0x415a60
sar eax, 1
mov ebx, dword [edi + 4]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x415a80
sar ecx, 1
lea edx, [eax + ecx]
add edx, 0x1b
test edx, edx
jns 0x415a9e
mov eax, 0xffffffff
jmp 0x415aa7
add eax, ecx
lea eax, [eax*2 + 0x36]
push eax
call fcn.00409540
add esp, 4
mov esi, eax
mov dword [esp + 8], 0x398e3b98
mov dword [esp + 0xc], 0x258b27a9
mov dword [esp + 0x10], 0x21b6238b
mov dword [esp + 0x14], 0x2d652f40
mov dword [esp + 0x18], 0x29b62bb4
mov dword [esp + 0x1c], 0x15841783
mov dword [esp + 0x20], 0x11851389
mov dword [esp + 0x24], 0x1d8c1f81
mov dword [esp + 0x28], 0x19a71b7c
mov dword [esp + 0x2c], 0x59a07b3
mov dword [esp + 0x30], 0x1950398
mov dword [esp + 0x34], 0xda70f92
mov dword [esp + 0x38], 0x9ae0b91
mov dword [esp + 0x3c], 0x7708
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x37
ja 0x415b6e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
add eax, 0x720d7e0b
xor eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0xc9
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x38
jb 0x415b40
mov ecx, dword [ebp + 4]
movzx edx, word [ecx]
mov eax, esi
test dx, dx
je 0x415b91
add ecx, 2
mov eax, esi
mov word [eax], dx
add eax, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x415b80
mov word [eax], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x415bc1
lea edx, [esp + 0xa]
nop
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 0x415bb0
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x415bf1
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x415be0
mov word [eax], 0
mov ebp, dword [ebp]
mov eax, 0xfffffffe
nop
nop
cmp word [ebp + eax + 2], 0
lea eax, [eax + 2]
jne 0x415c00
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx + 8]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x415c20
sar eax, 1
add eax, 0xe
mov ebx, dword [edi]
mov edx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + edx + 2], 0
lea edx, [edx + 2]
jne 0x415c40
sar ecx, 1
add eax, ecx
sar edx, 1
mov ecx, edx
and ecx, eax
xor edx, eax
lea eax, [edx + ecx*2]
test eax, eax
jns 0x415c65
mov eax, 0xffffffff
jmp 0x415c67
add eax, eax
push eax
call fcn.00409540
add esp, 4
mov edi, eax
movzx ecx, word [ebp]
test cx, cx
je 0x415c92
add ebp, 2
mov eax, edi
mov word [eax], cx
add eax, 2
movzx ecx, word [ebp]
add ebp, 2
test cx, cx
jne 0x415c80
mov word [eax], 0x2f
mov dword [esp + 8], 0x19d11bed
mov dword [esp + 0xc], 0xe55ae7a0
mov dword [esp + 0x10], 0xe150e34f
mov dword [esp + 0x14], 0xed59ef5d
mov dword [esp + 0x18], 0xe958eb5d
mov dword [esp + 0x1c], 0xf507f755
mov word [esp + 0x20], 0xf3f4
mov dword [esp + 0x22], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x1d
ja 0x415d2c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 8]
add ecx, 0xb29828fb
xor ecx, edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
mov edx, ecx
xor edx, 0xe7
and ecx, 0x18
add ecx, ecx
sub ecx, edx
mov edx, dword [esp]
mov byte [esp + edx + 8], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x1e
jb 0x415cf0
add eax, 2
mov ecx, dword [esp + 0x58]
mov ecx, dword [ecx + 8]
movzx edx, word [ecx]
test dx, dx
je 0x415d61
add ecx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
add eax, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x415d50
mov word [eax], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x415d91
lea edx, [esp + 0xa]
nop
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 0x415d80
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x415dc1
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x415db0
mov word [eax], 0
mov dword [esp + 8], 0x1f1e1976
mov byte [esp + 0xc], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 4
ja 0x415e1e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
add eax, 0xcfc03f3a
xor eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0xde
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 5
jb 0x415df0
lea eax, [esp + 8]
push 0
push 0
push 0
push 0xc00000
push eax
push esi
push edi
push dword [esp + 0x70]
call fcn.004182f0
add esp, 0x20
mov ebx, eax
jmp dword [0x43cde4]